Skip to content

Commit 98adfcc

Browse files
committed
Guard __attr_dealloc_free seperately from __attr_dealloc
Otherwise, header include order matters when building against a libc that does not itself define __attr_dealloc_free, such as musl.
1 parent 87c7821 commit 98adfcc

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

auparse/auparse.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#endif
3232
#ifndef __attr_dealloc
3333
# define __attr_dealloc(dealloc, argno)
34+
#endif
35+
#ifndef __attr_dealloc_free
3436
# define __attr_dealloc_free
3537
#endif
3638
#ifndef __attribute_malloc__

lib/audit_logging.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ extern "C" {
4040
#endif
4141
#ifndef __attr_dealloc
4242
# define __attr_dealloc(dealloc, argno)
43+
#endif
44+
#ifndef __attr_dealloc_free
4345
# define __attr_dealloc_free
4446
#endif
4547
// Warn unused result

lib/libaudit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
// malloc and free assignments
4444
#ifndef __attr_dealloc
4545
# define __attr_dealloc(dealloc, argno)
46+
#endif
47+
#ifndef __attr_dealloc_free
4648
# define __attr_dealloc_free
4749
#endif
4850
#ifndef __attribute_malloc__

0 commit comments

Comments
 (0)