[PATCH] Change include order in two compat/ files to avoid compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The inet_ntop and inet_pton compatibility wrapper source files
included system headers before git-compat-utils.h.  This was causing a
warning on Solaris as _FILE_OFFSET_BITS was being redefined in
git-compat-utils.h.  Including git-compat-utils.h first avoids the
warnings.

Signed-off-by: Ben Walton <bwalton@xxxxxxxxxxxxxxxxxx>
---

I verified that this re-ordering doesn't affect either the build or the 
test suite completion on both i386 and sparc.  I think the ordering is
simply the result of placing the git-compat-utils.h include where some
others were removed in da523cc597b1.

 compat/inet_ntop.c |    4 +---
 compat/inet_pton.c |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
index 60b5a1d..f1bf81c 100644
--- a/compat/inet_ntop.c
+++ b/compat/inet_ntop.c
@@ -15,11 +15,9 @@
  * SOFTWARE.
  */
 
+#include "../git-compat-util.h"
 #include <errno.h>
 #include <sys/types.h>
-
-#include "../git-compat-util.h"
-
 #include <stdio.h>
 #include <string.h>
 
diff --git a/compat/inet_pton.c b/compat/inet_pton.c
index 2ec995e..1d44a5d 100644
--- a/compat/inet_pton.c
+++ b/compat/inet_pton.c
@@ -15,11 +15,9 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "../git-compat-util.h"
 #include <errno.h>
 #include <sys/types.h>
-
-#include "../git-compat-util.h"
-
 #include <stdio.h>
 #include <string.h>
 
-- 
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]