It is only needed in files designed to be usable in standalone
compilation. In those files the #ifdefinery is indented. When
compiling in-tree, GNU_SOURCE is always defined, so remove one
definition.
#endif
#include <sys/types.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#ifdef __BIONIC__
#include <sys/socket.h>
#include <sys/un.h>
#ifdef __BIONIC__
-#include <linux/fcntl.h>
+# include <linux/fcntl.h>
#endif
#include <netinet/in.h>
#include <stdlib.h>
#endif
#include <netinet/in.h>
#include <stdlib.h>
#include <limits.h>
#if defined(__linux__)
#include <limits.h>
#if defined(__linux__)
#endif
#include "sd-daemon.h"
#if (__GNUC__ >= 4)
#endif
#include "sd-daemon.h"
#if (__GNUC__ >= 4)
-#ifdef SD_EXPORT_SYMBOLS
+# ifdef SD_EXPORT_SYMBOLS
-#define _sd_export_ __attribute__ ((visibility("default")))
-#else
+# define _sd_export_ __attribute__ ((visibility("default")))
+# else
/* Don't export the symbols */
/* Don't export the symbols */
-#define _sd_export_ __attribute__ ((visibility("hidden")))
-#endif
+# define _sd_export_ __attribute__ ((visibility("hidden")))
+# endif
#endif
_sd_export_ int sd_listen_fds(int unset_environment) {
#endif
_sd_export_ int sd_listen_fds(int unset_environment) {
#endif
#include <unistd.h>
#endif
#include <unistd.h>
#include "sd-readahead.h"
#if (__GNUC__ >= 4)
#include "sd-readahead.h"
#if (__GNUC__ >= 4)
-#ifdef SD_EXPORT_SYMBOLS
+# ifdef SD_EXPORT_SYMBOLS
-#define _sd_export_ __attribute__ ((visibility("default")))
-#else
+# define _sd_export_ __attribute__ ((visibility("default")))
+# else
/* Don't export the symbols */
/* Don't export the symbols */
-#define _sd_export_ __attribute__ ((visibility("hidden")))
-#endif
+# define _sd_export_ __attribute__ ((visibility("hidden")))
+# endif
#endif
static int touch(const char *path) {
#endif
static int touch(const char *path) {
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>