Răsfoiți Sursa

Fix OS X compilation

mingodad 9 ani în urmă
părinte
comite
4c43f55c7d
2 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 4 0
      myaxtls/os_int.h
  2. 1 1
      myaxtls/os_port.h

+ 4 - 0
myaxtls/os_int.h

@@ -61,6 +61,10 @@ typedef INT64 int64_t;
 #elif defined(__BSD__)
     #include <sys/types.h>
     #include <sys/endian.h>
+#elif defined(__APPLE__)
+    #include <sys/types.h>
+    #include <sys/_endian.h>
+    #define be64toh(val) ntohll(val)
 #else
     #include <endian.h>
     // Android compatibility

+ 1 - 1
myaxtls/os_port.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2007-2015, Cameron Rich
- * 
+ *
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without