ledmon/0001-fix-compilation-warnings-on-newer-gcc.patch

58 lines
1.4 KiB
Diff

From 8e82bd8bec79d066c6263f99d395c87be4086dbc Mon Sep 17 00:00:00 2001
From: Zhilong Liu <zlliu@suse.com>
Date: Mon, 27 Nov 2017 11:29:50 +0800
Subject: [PATCH] fix compilation warnings on newer gcc
bsc#1067452
URL: https://bugzilla.suse.com/show_bug.cgi?id=1067452#c4
Upstream URL: https://github.com/intel/ledmon
Commit ID: e51e1a855df80e34e166984373dce7d765d61d52
Signed-off-by: Zhilong Liu <zlliu@suse.com>
---
src/Makefile | 2 +-
src/ledctl.c | 1 +
src/smp.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index bb718d5..19a27d0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -62,7 +62,7 @@ CXFLAGS=-O0 -g
CWFLAGS=-Wall
CFLAGS=$(CXFLAGS) $(CWFLAGS)
-DEFFLAGS=-D_DEBUG -D_GNU_SOURCE -D_BSD_SOURCE -DDMALLOC_DISABLE
+DEFFLAGS=-D_DEBUG -D_GNU_SOURCE -D_DEFAULT_SOURCE -DDMALLOC_DISABLE
CPPFLAGS=$(DEFFLAGS)
ALL_CPPFLAGS=$(CPPFLAGS) -I../config
diff --git a/src/ledctl.c b/src/ledctl.c
index 2d013b4..e060fe2 100644
--- a/src/ledctl.c
+++ b/src/ledctl.c
@@ -30,6 +30,7 @@
#include <syslog.h>
#include <time.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#if _HAVE_DMALLOC_H
#include <dmalloc.h>
diff --git a/src/smp.c b/src/smp.c
index 7912bd0..872c0ca 100644
--- a/src/smp.c
+++ b/src/smp.c
@@ -31,6 +31,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#if _HAVE_DMALLOC_H
#include <dmalloc.h>
--
2.15.0