teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0735-util-define-free_func_t.patch

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