• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libnet/0001-support-musl-libc.patch
Tobias KlauserTobias Klauser committed 966e0e8e10d14 Nov 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From ffd7fab744a9ad2893169a8fb6244074604d5d0d Mon Sep 17 00:00:00 2001
2
From: rofl0r <retnyg@gmx.net>
3
Date: Tue, 12 Aug 2014 21:51:39 +0200
4
Subject: [PATCH] Support musl libc, remove support for glibc < 2.1
5
​
6
The workarounds for glibc < 2.1 (was released february 1999) break the
7
build with musl libc.
8
​
9
It is very unlikely that 2.0 or earlier is still in use, and if so,
10
1) that's a big security hole
11
2) code wouldnt compile anyway since noone tested build in the last decade
12
3) user of it wouldn't expect anyway to get bleeding edge sw built on it,
13
   so he would just use the latest version that works for him.
14
​
15
Closes #52
16
---
17
 libnet/src/libnet_link_linux.c | 11 -----------
18
 1 file changed, 11 deletions(-)
19
​
20
diff --git a/libnet/src/libnet_link_linux.c b/libnet/src/libnet_link_linux.c
21
index 054458d..3c6df3c 100644
22
--- a/src/libnet_link_linux.c
23
+++ b/src/libnet_link_linux.c
24
@@ -30,26 +30,15 @@
25
 #include <sys/time.h>
26
 
27
 #include <net/if.h>
28
-#if (__GLIBC__)
29
 #include <netinet/if_ether.h>
30
 #include <net/if_arp.h>
31
-#else
32
-#include <linux/if_arp.h>
33
-#include <linux/if_ether.h>
34
-#endif
35
 
36
 #if (HAVE_PACKET_SOCKET)
37
 #ifndef SOL_PACKET
38
 #define SOL_PACKET 263
39
 #endif  /* SOL_PACKET */
40
-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
41
 #include <netpacket/packet.h>
42
 #include <net/ethernet.h>     /* the L2 protocols */
43
-#else
44
-#include <asm/types.h>
45
-#include <linux/if_packet.h>
46
-#include <linux/if_ether.h>   /* The L2 protocols */
47
-#endif
48
 #endif  /* HAVE_PACKET_SOCKET */
49
 
50
 #include "../include/libnet.h"
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.