• 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/norm/0002-protolib-drop-linux-version-check.patch
Gustavo ZacariasGustavo Zacarias committed 117af296f8131 Mar 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
The char * to unsigned char * change happened for the libnetfilter_queue
2
1.0.0 release, not the linux headers.
3
So drop the linux headers version check since it causes more harm than
4
good by trying the old API when the toolchain uses old linux headers
5
with a new-enough libnetfilter_queue.
6
​
7
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
8
​
9
diff -Nura norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp norm-1.5r6/protolib/src/linux/linuxDetour.cpp
10
--- norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp  2016-03-31 10:17:20.674745597 -0300
11
+++ norm-1.5r6/protolib/src/linux/linuxDetour.cpp   2016-03-31 10:36:58.923084395 -0300
12
@@ -16,8 +16,6 @@
13
 #include <linux/if_ether.h>  // for ETH_P_IP
14
 #include <net/if_arp.h>   // for ARPHRD_ETHER
15
 
16
-#include <linux/version.h>  // for LINUX_VERSION_CODE
17
-
18
 /** NOTES: 
19
  *
20
  * 1) This newer implementation of LinuxDetour uses netfilter_queue
21
@@ -591,17 +589,7 @@
22
     
23
     // Finally record packet length and cache pointer to IP packet data
24
     
25
-    // A change to the nfq_get_payload() prototype seemed to kick in around Linux header files
26
-    // version 3.6?  (This will probably need to be fine tuned for the right version threshold.)
27
-
28
-#define LINUX_VERSION_MAJOR (LINUX_VERSION_CODE/65536)
29
-#define LINUX_VERSION_MINOR ((LINUX_VERSION_CODE - (LINUX_VERSION_MAJOR*65536)) / 256)
30
-
31
-#if ((LINUX_VERSION_MAJOR > 3) || ((LINUX_VERSION_MAJOR == 3) && (LINUX_VERSION_MINOR > 5)))
32
     linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, (unsigned char**)(&linuxDetour->nfq_pkt_data));
33
-#else
34
-    linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, &linuxDetour->nfq_pkt_data);
35
-#endif //
36
     return 0;
37
 }  // end LinuxDetour::NfqCallback()
38
 
  • 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.