You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lirc/0004-all-Sanitize-feature-t...

88 lines
1.9 KiB

From 18933e88521431abea8f0bf720cf35cc37d2def4 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 11:03:12 +0100
Subject: [PATCH 4/5] all: Sanitize feature tests macros.
---
daemons/lircd.c | 3 ---
lib/lirc_client.c | 6 +-----
plugins/srm7500libusb.c | 1 +
tools/lirc-lsplugins.c | 0
tools/lirc-lsremotes.c | 4 ----
5 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index ab44e80..d1bdc7c 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -31,9 +31,6 @@
# include <config.h>
#endif
-#define _GNU_SOURCE
-#define _BSD_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/lib/lirc_client.c b/lib/lirc_client.c
index 4720f3f..b161f0e 100644
--- a/lib/lirc_client.c
+++ b/lib/lirc_client.c
@@ -17,11 +17,6 @@
* @author Christoph Bartelmus, Trent Piepho, Michal Svec
*/
-// define _XOPEN_SOURCE for WEXITSTATUS
-#define _XOPEN_SOURCE
-// define _BSD_SOURCE for strdup()
-#define _BSD_SOURCE
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -34,6 +29,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
+#include <strings.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
diff --git a/plugins/srm7500libusb.c b/plugins/srm7500libusb.c
index f598f4d..06206bc 100644
--- a/plugins/srm7500libusb.c
+++ b/plugins/srm7500libusb.c
@@ -33,6 +33,7 @@
#endif
#define _GNU_SOURCE
+
#include <errno.h>
#include <signal.h>
#include <string.h>
diff --git a/tools/lirc-lsremotes.c b/tools/lirc-lsremotes.c
index 11e806a..7c6ab06 100644
--- a/tools/lirc-lsremotes.c
+++ b/tools/lirc-lsremotes.c
@@ -7,16 +7,12 @@
*
*/
-#define _GNU_SOURCE
-
#include <config.h>
#include <dirent.h>
#include <getopt.h>
#include <errno.h>
#include <fnmatch.h>
-
-
#include <glob.h>
#include <libgen.h>
#include <limits.h>
--
1.9.3