mirror of
https://git.openwrt.org/project/procd.git
synced 2026-01-14 12:33:11 +00:00
glibc sets __attribute_warn_unused_result__ on symlink(3) if FORTIFY_SOURCE is set. This breaks procd which deliberately ignores the result of the symlink(3) call early during init as there wouldn't be anything better to do in that case other than ignoring the error and trying to survive. Introduce libc-compat.h to work-around libc anomalities. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 lines
193 B
C
11 lines
193 B
C
#ifndef __PROCD_LIBC_COMPAT_H
|
|
#define __PROCD_LIBC_COMPAT_H
|
|
|
|
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
|
static inline int ignore(int x) {return x;}
|
|
#else
|
|
#define ignore(x) x
|
|
#endif
|
|
|
|
#endif
|