hplip/add_missing_includes_and_define_GNU_SOURCE.patch

74 lines
2.1 KiB
Diff
Raw Normal View History

diff -urEbwB hplip-3.20.9/common/utils.c hplip-3.20.9.new/common/utils.c
--- hplip-3.20.9/common/utils.c 2020-09-23 07:24:09.000000000 +0200
+++ hplip-3.20.9.new/common/utils.c 2020-11-23 12:21:21.471541779 +0100
@@ -1,9 +1,14 @@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include "utils.h"
#include "string.h"
#include <dlfcn.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
extern int errno;
diff -urEbwBN hplip-3.20.9/io/hpmud/jd.c hplip-3.20.9.new/io/hpmud/jd.c
--- hplip-3.20.9/io/hpmud/jd.c 2020-09-23 07:24:10.000000000 +0200
+++ hplip-3.20.9.new/io/hpmud/jd.c 2020-11-23 12:12:14.920243467 +0100
@@ -31,6 +31,7 @@
#endif
#include <signal.h>
+#include <stdlib.h>
#include "hpmud.h"
#include "hpmudi.h"
diff -urEbwBN hplip-3.20.9/protocol/hp_ipp.c hplip-3.20.9.new/protocol/hp_ipp.c
--- hplip-3.20.9/protocol/hp_ipp.c 2020-09-23 07:24:16.000000000 +0200
+++ hplip-3.20.9.new/protocol/hp_ipp.c 2020-11-23 12:12:21.624283957 +0100
@@ -18,6 +18,9 @@
\******************************************************************************/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
#include <cups/cups.h>
#include <cups/language.h>
diff -urEbwBN hplip-3.20.9/scan/sane/bb_ledm.c hplip-3.20.9.new/scan/sane/bb_ledm.c
--- hplip-3.20.9/scan/sane/bb_ledm.c 2020-09-23 07:24:20.000000000 +0200
+++ hplip-3.20.9.new/scan/sane/bb_ledm.c 2020-11-23 12:12:21.628283981 +0100
@@ -27,6 +27,7 @@
# include "xml.h"
# include <stdlib.h>
+# include <unistd.h>
# include <stdint.h>
# define _STRINGIZE(x) #x
diff -urEbwBN hplip-3.20.9/scan/sane/sclpml.c hplip-3.20.9.new/scan/sane/sclpml.c
--- hplip-3.20.9/scan/sane/sclpml.c 2020-09-23 07:24:20.000000000 +0200
+++ hplip-3.20.9.new/scan/sane/sclpml.c 2020-11-23 12:12:21.628283981 +0100
@@ -25,11 +25,16 @@
\************************************************************************************/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
+#include <sys/time.h>
#include "sane.h"
#include "saneopts.h"
#include "common.h"