Skip to content

Commit

Permalink
netlink: Don't define USE_GNU
Browse files Browse the repository at this point in the history
Applications should never #define USE_GNU themselves, but rather
_GNU_SOURCE. This patch removes USE_GNU and replaces it with including
config.h which has _GNU_SOURCE defined if applicable for that platform

See for example:
    https://gcc.gnu.org/ml/fortran/2005-10/msg00365.html
  • Loading branch information
jhrozek committed Aug 30, 2016
1 parent ff35d4f commit f887631
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/monitor/monitor_netlink.c
Expand Up @@ -21,11 +21,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "config.h"

#include <talloc.h>
#include <tevent.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#define __USE_GNU /* needed for struct ucred */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Expand Down

0 comments on commit f887631

Please sign in to comment.