Skip to content

Instantly share code, notes, and snippets.

@oraccha
Created May 7, 2010 02:09
Show Gist options
  • Save oraccha/392941 to your computer and use it in GitHub Desktop.
Save oraccha/392941 to your computer and use it in GitHub Desktop.
* requirement
- uIP 1.0, http://www.sics.se/~adam/uip/index.php/Main_Page
- TUNTAP driver for Mac OS X, http://tuntaposx.sourceforge.net/
----
* patch for uIP 1.0
diff -ru uip-1.0.orig/uip/Makefile.include uip-1.0/uip/Makefile.include
--- uip-1.0.orig/uip/Makefile.include 2006-06-12 17:22:48.000000000 +0900
+++ uip-1.0/uip/Makefile.include 2010-05-07 10:43:33.000000000 +0900
@@ -41,7 +41,7 @@
endif
uip.a: ${addprefix $(OBJECTDIR)/, $(UIP_SOURCES:.c=.o)}
- $(AR) rcf $@ $^
+ $(AR) rc $@ $^
apps.a: ${addprefix $(OBJECTDIR)/, $(APP_SOURCES:.c=.o)}
- $(AR) rcf $@ $^
+ $(AR) rc $@ $^
diff -ru uip-1.0.orig/uip/uip.h uip-1.0/uip/uip.h
--- uip-1.0.orig/uip/uip.h 2006-06-12 17:22:48.000000000 +0900
+++ uip-1.0/uip/uip.h 2010-05-07 10:35:09.000000000 +0900
@@ -1070,7 +1070,9 @@
# define HTONS(n) (u16_t)((((u16_t) (n)) << 8) | (((u16_t) (n)) >> 8))
# endif /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */
#else
+#if !(defined(__APPLE__) && defined(__MACH__))
#error "HTONS already defined!"
+#endif
#endif /* HTONS */
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment