Skip to content

Commit

Permalink
Stop including net/if.h from qplatformdefs.h
Browse files Browse the repository at this point in the history
I need to include linxx/if.h from elsewhere and these two files conflict
by defining the same types (struct ifreq, struct ifmap, struct ifconf,
etc.)

Change-Id: I0a103569c81b4711a649fffd14eb2f6dbbef83b6
Reviewed-by: Jake Petroules <[email protected]>
  • Loading branch information
thiagomacieira committed Oct 8, 2017
1 parent ca49f13 commit 4a44bd6
Show file tree
Hide file tree
Showing 24 changed files with 4 additions and 72 deletions.
4 changes: 0 additions & 4 deletions mkspecs/android-clang/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
#include <sys/stat.h>
#include <sys/wait.h>

#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
Expand Down
4 changes: 0 additions & 4 deletions mkspecs/android-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
#include <sys/stat.h>
#include <sys/wait.h>

#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/aix/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// Only AIX 4.3 and better support 64-bit

Expand Down
4 changes: 0 additions & 4 deletions mkspecs/common/android/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
#include <sys/stat.h>
#include <sys/wait.h>

#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/bsd/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/integrity/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// for htonl
#include <arpa/inet.h>
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/mac/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#include <sys/wait.h>
#define __APPLE_USE_RFC_3542
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/qnx/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// for htonl
#include <arpa/inet.h>
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/darwin-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../common/posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/haiku-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../common/posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/hpuxi-g++-64/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#define QT_NO_READDIR64
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/hurd-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../common/posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/linux-clang/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/linux-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/linux-llvm/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/linux-lsb-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// LSB 3.1 defines htonl and friends here
#include <arpa/inet.h>
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/lynxos-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#include "../common/posix/qplatformdefs.h"

Expand Down
3 changes: 0 additions & 3 deletions mkspecs/solaris-cc-64/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/solaris-cc/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/solaris-g++-64/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/solaris-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../common/posix/qplatformdefs.h"
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// for htonl
#include <arpa/inet.h>
Expand Down
3 changes: 0 additions & 3 deletions src/corelib/kernel/qfunctions_vxworks.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <netinet/in.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

// VxWorks has public header mbuf.h which defines following variables for DKM.
// Let's undef those to because they overlap with Qt variable names-
Expand Down
4 changes: 4 additions & 0 deletions src/network/kernel/qnetworkinterface_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
#endif
#include <net/if.h>

#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif

#if defined(QT_LINUXBASE)
# define QT_NO_GETIFADDRS
#endif
Expand Down

0 comments on commit 4a44bd6

Please sign in to comment.