dcavalca / rpms / systemd

Forked from rpms/systemd 4 months ago
Clone
be0c12
From 8d596fa931a32e517323379dde6a73ee2a72506c Mon Sep 17 00:00:00 2001
be0c12
From: Yu Watanabe <watanabe.yu+github@gmail.com>
be0c12
Date: Tue, 27 Nov 2018 16:33:28 +0900
be0c12
Subject: [PATCH] util: define free_func_t
be0c12
be0c12
(cherry picked from commit e30f9c972b789152d67ff34fd3bda294d20d1f51)
be0c12
be0c12
Resolves: #2037807
be0c12
---
be0c12
 src/basic/alloc-util.h | 2 ++
be0c12
 1 file changed, 2 insertions(+)
be0c12
be0c12
diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
be0c12
index ebe42889ea..f8294da68f 100644
be0c12
--- a/src/basic/alloc-util.h
be0c12
+++ b/src/basic/alloc-util.h
be0c12
@@ -8,6 +8,8 @@
be0c12
 
be0c12
 #include "macro.h"
be0c12
 
be0c12
+typedef void (*free_func_t)(void *p);
be0c12
+
be0c12
 #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
be0c12
 
be0c12
 #define new0(t, n) ((t*) calloc((n), sizeof(t)))