diff --git a/config_h.patch b/config_h.patch new file mode 100644 index 0000000..0ef66f6 --- /dev/null +++ b/config_h.patch @@ -0,0 +1,530 @@ +diff --git a/src/backend-suse.c b/src/backend-suse.c +index bd98fcb..b6a3644 100644 +--- a/src/backend-suse.c ++++ b/src/backend-suse.c +@@ -27,6 +27,9 @@ + * wicked under the LGPL-2.1+ in libnetcontrol. + * You can find the wicked project at http://gitorious.org/wicked/. + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/bonding.c b/src/bonding.c +index 39c6b39..671edb6 100644 +--- a/src/bonding.c ++++ b/src/bonding.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/bonding.h b/src/bonding.h +index d6fd3eb..7421a5b 100644 +--- a/src/bonding.h ++++ b/src/bonding.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_BONDING_H + #define __NETCONTROL_BONDING_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/bridge.c b/src/bridge.c +index f915f9e..d08a2f0 100644 +--- a/src/bridge.c ++++ b/src/bridge.c +@@ -28,16 +28,13 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include + #include +- /* +-#include +-#include +-#include +-*/ +- + #include + #include + #include +diff --git a/src/bridge.h b/src/bridge.h +index 9882574..b155999 100644 +--- a/src/bridge.h ++++ b/src/bridge.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_BRIDGE_H + #define __NETCONTROL_BRIDGE_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/cmd_pipe.c b/src/cmd_pipe.c +index bc5cee0..9c100aa 100644 +--- a/src/cmd_pipe.c ++++ b/src/cmd_pipe.c +@@ -27,6 +27,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/cmd_pipe.h b/src/cmd_pipe.h +index 99fc849..e139b7a 100644 +--- a/src/cmd_pipe.h ++++ b/src/cmd_pipe.h +@@ -29,6 +29,9 @@ + */ + #ifndef __NETCONTROL_CMD_PIPE_H + #define __NETCONTROL_CMD_PIPE_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/futils.c b/src/futils.c +index ae642e0..a0a6b6d 100644 +--- a/src/futils.c ++++ b/src/futils.c +@@ -27,6 +27,9 @@ + * wicked under the LGPL-2.1+ in libnetcontrol. + * You can find the wicked project at http://gitorious.org/wicked/. + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/futils.h b/src/futils.h +index 52aee94..913c640 100644 +--- a/src/futils.h ++++ b/src/futils.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_FUTILS_H + #define __NETCONTROL_FUTILS_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + +diff --git a/src/handle.c b/src/handle.c +index 98ce983..9c98c0d 100644 +--- a/src/handle.c ++++ b/src/handle.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/handle.h b/src/handle.h +index 484d54c..9447ad7 100644 +--- a/src/handle.h ++++ b/src/handle.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_HANDLE_H + #define __NETCONTROL_HANDLE_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + +diff --git a/src/logging.c b/src/logging.c +index 837a313..bb93610 100644 +--- a/src/logging.c ++++ b/src/logging.c +@@ -28,8 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) + #include +- ++#endif + #include + #include + #include +diff --git a/src/logging.h b/src/logging.h +index e9b3976..d00c9dc 100644 +--- a/src/logging.h ++++ b/src/logging.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_LOGGING_H + #define __NETCONTROL_LOGGING_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #ifdef __GNUC__ + # define __fmtattr(f,a) __attribute__ ((format (printf, f, a))) +diff --git a/src/nctest.c b/src/nctest.c +index d906df2..816b941 100644 +--- a/src/nctest.c ++++ b/src/nctest.c +@@ -26,6 +26,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/netcf-xml.c b/src/netcf-xml.c +index 0dcd198..5b5738a 100644 +--- a/src/netcf-xml.c ++++ b/src/netcf-xml.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/netcf.c b/src/netcf.c +index 57c16af..7ceb336 100644 +--- a/src/netcf.c ++++ b/src/netcf.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/ntypes.h b/src/ntypes.h +index 8865dc7..bc5531c 100644 +--- a/src/ntypes.h ++++ b/src/ntypes.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_NTYPES_H + #define __NETCONTROL_NTYPES_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/nutils.c b/src/nutils.c +index 8956581..7dada29 100644 +--- a/src/nutils.c ++++ b/src/nutils.c +@@ -28,7 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ +- ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/nutils.h b/src/nutils.h +index 17961af..cf84f3e 100644 +--- a/src/nutils.h ++++ b/src/nutils.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_NUTILS_H + #define __NETCONTROL_NUTILS_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/sutils.c b/src/sutils.c +index dd6188b..f3684ed 100644 +--- a/src/sutils.c ++++ b/src/sutils.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/sutils.h b/src/sutils.h +index c5862d8..3f05680 100644 +--- a/src/sutils.h ++++ b/src/sutils.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_SUTILS_H + #define __NETCONTROL_SUTILS_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/syntax.c b/src/syntax.c +index 4343a8d..78ef526 100644 +--- a/src/syntax.c ++++ b/src/syntax.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + +diff --git a/src/syntax.h b/src/syntax.h +index 7ca60ac..25c69a4 100644 +--- a/src/syntax.h ++++ b/src/syntax.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_SYNTAX_H + #define __NETCONTROL_SYNTAX_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/sysconfig.c b/src/sysconfig.c +index bb90075..7faa96c 100644 +--- a/src/sysconfig.c ++++ b/src/sysconfig.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/sysconfig.h b/src/sysconfig.h +index 13a1507..2902746 100644 +--- a/src/sysconfig.h ++++ b/src/sysconfig.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_UTILS_SYSCONFIG_H + #define __NETCONTROL_UTILS_SYSCONFIG_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + +diff --git a/src/sysctl.c b/src/sysctl.c +index 5100d8b..07e54c4 100644 +--- a/src/sysctl.c ++++ b/src/sysctl.c +@@ -26,6 +26,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/sysctl.h b/src/sysctl.h +index 87f0de1..9746790 100644 +--- a/src/sysctl.h ++++ b/src/sysctl.h +@@ -28,6 +28,9 @@ + */ + #ifndef __NETCONTROL_SYSCTL_H + #define __NETCONTROL_SYSCTL_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + +diff --git a/src/sysfs.c b/src/sysfs.c +index fe3427a..a482be7 100644 +--- a/src/sysfs.c ++++ b/src/sysfs.c +@@ -27,6 +27,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/sysfs.h b/src/sysfs.h +index 58d246c..c841e4c 100644 +--- a/src/sysfs.h ++++ b/src/sysfs.h +@@ -29,6 +29,9 @@ + */ + #ifndef __NETCONTROL_SYSFS_H + #define __NETCONTROL_SYSFS_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/udev_utils.c b/src/udev_utils.c +index 8337391..d86f25c 100644 +--- a/src/udev_utils.c ++++ b/src/udev_utils.c +@@ -26,6 +26,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/udev_utils.h b/src/udev_utils.h +index 86bb03a..ac70c0c 100644 +--- a/src/udev_utils.h ++++ b/src/udev_utils.h +@@ -28,6 +28,9 @@ + */ + #ifndef __NETCONTROL_UDEV_UTILS_H + #define __NETCONTROL_UDEV_UTILS_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + +diff --git a/src/vlan.c b/src/vlan.c +index b4d30e7..d5e89d6 100644 +--- a/src/vlan.c ++++ b/src/vlan.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/vlan.h b/src/vlan.h +index 3cd083d..1b77128 100644 +--- a/src/vlan.h ++++ b/src/vlan.h +@@ -30,6 +30,9 @@ + */ + #ifndef __NETCONTROL_VLAN_H + #define __NETCONTROL_VLAN_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + #include +diff --git a/src/xml-reader.c b/src/xml-reader.c +index 328e050..403d117 100644 +--- a/src/xml-reader.c ++++ b/src/xml-reader.c +@@ -30,6 +30,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/xml-writer.c b/src/xml-writer.c +index d8d2312..58efbe3 100644 +--- a/src/xml-writer.c ++++ b/src/xml-writer.c +@@ -30,6 +30,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/xml.c b/src/xml.c +index 8a452b5..eb2846a 100644 +--- a/src/xml.c ++++ b/src/xml.c +@@ -28,6 +28,9 @@ + * You can find the wicked project at http://gitorious.org/wicked/. + * + */ ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + #include + #include + #include +diff --git a/src/xml.h b/src/xml.h +index 46013ab..71b1460 100644 +--- a/src/xml.h ++++ b/src/xml.h +@@ -32,6 +32,9 @@ + */ + #ifndef __NETCONTROL_XML_H + #define __NETCONTROL_XML_H ++#if defined(HAVE_CONFIG_H) ++#include ++#endif + + #include + diff --git a/netcontrol.changes b/netcontrol.changes index 1a85f00..acb7739 100644 --- a/netcontrol.changes +++ b/netcontrol.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 8 17:05:01 UTC 2011 - mt@suse.de + +- Fixed to include config.h to have _GNU_SOURCE defined + ------------------------------------------------------------------- Fri Aug 26 11:04:59 UTC 2011 - mt@suse.de diff --git a/netcontrol.spec b/netcontrol.spec index e4bb9a7..a1a9820 100644 --- a/netcontrol.spec +++ b/netcontrol.spec @@ -19,7 +19,7 @@ Name: netcontrol Version: 0.2.3 -Release: 0. +Release: 0 Summary: A network configuration library Group: Productivity/Networking/System License: LGPL v2.1 or later @@ -32,6 +32,7 @@ License: LGPL v2.1 or later # Source0: %{name}-%{version}.tar.bz2 Source1: baselibs.conf +Patch1: config_h.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build #BuildRequires: libnl-devel #BuildRequires: pkg-config @@ -87,6 +88,7 @@ Authors: %prep %setup -q +%patch1 -p1 %{?suse_update_config:%{suse_update_config -f}} %build