Files
procd/libc-compat.h
Daniel Golle d5fddd91b9 explicitely ignore return value of symlink(3) call
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>
2015-10-26 00:11:04 +01:00

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