diff rogue4/mdport.c @ 284:6376b514a30b

Fix more header-related warnings. This fixes all current default warnings with GCC7 on Linux. That does not mean the code is anywhere close to clean.
author John "Elwin" Edwards
date Fri, 22 Sep 2017 16:24:40 -0400
parents 8b6aba552f6f
children 5b6855d5d089
line wrap: on
line diff
--- a/rogue4/mdport.c	Mon Sep 18 19:36:14 2017 -0400
+++ b/rogue4/mdport.c	Fri Sep 22 16:24:40 2017 -0400
@@ -43,6 +43,8 @@
 #undef MOUSE_MOVED
 #elif defined(__DJGPP__)
 #include <process.h>
+#else
+#include <sys/wait.h>
 #endif
 
 #ifdef HAVE_PWD_H
@@ -54,6 +56,9 @@
 #ifdef HAVE_UTMPX_H
 #include <utmpx.h>
 #endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
 
 #ifdef __INTERIX
 char *strdup(const char *s);
@@ -535,7 +540,7 @@
 unsigned long int
 md_ntohl(unsigned long int x)
 {
-#ifdef _WIN32
+#ifndef HAVE_ARPA_INET_H
     if ( *((char *)&md_endian) == 0x01 )
         return(x);
     else
@@ -551,7 +556,7 @@
 unsigned long int
 md_htonl(unsigned long int x)
 {
-#ifdef _WIN32
+#ifndef HAVE_ARPA_INET_H
     if ( *((char *)&md_endian) == 0x01 )
         return(x);
     else