fix package build build with rtk linux 4.4

(cherry picked from commit b11ef0bb2177e95f89224640c6c51fb118b2ac0e)
(cherry picked from commit 2567630682b8a96ed13d99e51950088ff93e7ee3)
This commit is contained in:
jjm2473 2020-11-19 13:07:33 +08:00
parent 54cce4effd
commit abe8d7af8d
4 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/file.c
+++ b/file.c
@@ -244,7 +244,7 @@ void exfat_truncate(struct inode *inode,
{
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- unsigned int blocksize = i_blocksize(inode);
+ unsigned int blocksize = (1 << inode->i_blkbits);
loff_t aligned_size;
int err;

View File

@ -0,0 +1,15 @@
--- a/system-linux.c
+++ b/system-linux.c
@@ -30,6 +30,12 @@
#include <netinet/ether.h>
#include <netinet/in.h>
+#if !defined(__GLIBC__)
+/* avoid IPPROTO_TCP redefine */
+#define _LIBC_COMPAT_H
+#define _LINUX_IF_ETHER_H
+#endif
+
#include <linux/rtnetlink.h>
#include <linux/neighbour.h>
#include <linux/sockios.h>

View File

@ -0,0 +1,20 @@
--- a/libipt_FULLCONENAT.c
+++ b/libipt_FULLCONENAT.c
@@ -1,3 +1,7 @@
+#if !defined(__GLIBC__)
+/* avoid IPPROTO_IP,in_addr,in6_addr,sockaddr_in6,etc. redefine */
+#define _LIBC_COMPAT_H
+#endif
#include <stdio.h>
#include <netdb.h>
#include <string.h>
--- a/libip6t_FULLCONENAT.c
+++ b/libip6t_FULLCONENAT.c
@@ -1,3 +1,7 @@
+#if !defined(__GLIBC__)
+/* avoid IPPROTO_IP,in_addr,in6_addr,sockaddr_in6,etc. redefine */
+#define _LIBC_COMPAT_H
+#endif
#include <stdio.h>
#include <netdb.h>
#include <string.h>

View File

@ -0,0 +1,14 @@
--- a/pppd/plugins/rp-pppoe/plugin.c
+++ b/pppd/plugins/rp-pppoe/plugin.c
@@ -49,6 +49,11 @@ static char const RCSID[] =
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <linux/ppp_defs.h>
+#if !defined(__GLIBC__)
+/* avoid IPPROTO_TCP redefine */
+#define _LIBC_COMPAT_H
+#define _LINUX_IF_ETHER_H
+#endif
#include <linux/if_pppox.h>
#ifndef _ROOT_PATH