richardphibel / rpms / systemd

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