cibyr
Joined: 05 Mar 2009 Posts: 1
|
Posted: Thu Mar 05, 2009 5:12 am Post subject: [PATCH] Don't #include <utility.h> on sun |
|
|
Including utility.h on Solaris causes problems for me (probably because I'm not using the Sun toolchain or libraries). In any case, there's no point including a whole file just for a macro you're defining anyway, so this patch fixes that.
Code: | diff -ur miniupnp/miniwget.c miniupnp/miniwget.c
--- miniupnp/miniwget.c 2009-03-05 15:01:22.348453493 +1000
+++ miniupnp/miniwget.c 2009-03-05 15:05:20.667854747 +1000
@@ -13,7 +13,6 @@
#include <winsock2.h>
#include <io.h>
#define MAXHOSTNAMELEN 64
-#define MIN(x,y) (((x)<(y))?(x):(y))
#define snprintf _snprintf
#define herror
#define socklen_t int
@@ -26,9 +25,9 @@
#include <arpa/inet.h>
#define closesocket close
#endif
-/* for MIN() macro : */
-#if defined(__sun) || defined(sun)
-#include <utility.h>
+
+#ifndef MIN
+#define MIN(x,y) (((x)<(y))?(x):(y))
#endif
/* miniwget2() :
|
|
|