diff --git a/lib/Makefile.PS2_EE b/lib/Makefile.PS2_EE index b76cce3e..654a917c 100644 --- a/lib/Makefile.PS2_EE +++ b/lib/Makefile.PS2_EE @@ -1,4 +1,4 @@ -EE_CFLAGS = -DPS2_EE_PLATFORM -DHAVE_CONFIG_H \ +EE_CFLAGS = -DPS2_EE_PLATFORM -DHAVE_CONFIG_H -DNEED_BE64TOH -DNEED_POLL -DNEED_WRITEV -DNEED_READV \ -D_U_=/**/ -I../include -I../include/ps2 -I../include/smb2 EE_LIB = libsmb2.a diff --git a/lib/Makefile.PS2_IOP b/lib/Makefile.PS2_IOP index e070cff6..9ab8aa3a 100644 --- a/lib/Makefile.PS2_IOP +++ b/lib/Makefile.PS2_IOP @@ -1,4 +1,4 @@ -IOP_CFLAGS = -DPS2_IOP_PLATFORM -DHAVE_CONFIG_H +IOP_CFLAGS = -DPS2_IOP_PLATFORM -DHAVE_CONFIG_H -DNEED_BE64TOH -DNEED_STRDUP -DNEED_READV -DNEED_WRITEV -DNEED_POLL -D_U_=/**/ IOP_CFLAGS += -Wall -Os -I. -I../include -I../include/ps2 -I../include/smb2 diff --git a/lib/Makefile.PS3_PPU b/lib/Makefile.PS3_PPU index 19935fc9..e1304bff 100644 --- a/lib/Makefile.PS3_PPU +++ b/lib/Makefile.PS3_PPU @@ -37,7 +37,7 @@ INCLUDE := ../include ../include/ps3 ../include/smb2 DATA := data LIBS := -MACHDEP := -DPS3_PPU_PLATFORM -DHAVE_CONFIG_H -D_U_=/**/ +MACHDEP := -DPS3_PPU_PLATFORM -DHAVE_CONFIG_H -DNEED_READV -DNEED_WRITEV -D_U_=/**/ CFLAGS += -O2 -Wall -mcpu=cell $(MACHDEP) -fno-strict-aliasing $(INCLUDES) diff --git a/lib/compat.c b/lib/compat.c index 622fb9d7..bd6ed2b7 100644 --- a/lib/compat.c +++ b/lib/compat.c @@ -44,27 +44,18 @@ #ifdef PS2_EE_PLATFORM -#define NEED_READV -#define NEED_WRITEV -#define NEED_POLL -#define NEED_BE64TOH - #include #include #include +#include +#include #endif /* PS2_EE_PLATFORM */ #ifdef PS2_IOP_PLATFORM #include -#define NEED_BE64TOH -#define NEED_STRDUP -#define NEED_READV -#define NEED_WRITEV -#define NEED_POLL - static unsigned long int next = 1; int random(void) @@ -128,9 +119,6 @@ int iop_connect(int sockfd, struct sockaddr *addr, socklen_t addrlen) #ifdef PS3_PPU_PLATFORM -#define NEED_READV -#define NEED_WRITEV - #include int smb2_getaddrinfo(const char *node, const char*service, diff --git a/lib/compat.h b/lib/compat.h index 3b67db29..6395e65e 100644 --- a/lib/compat.h +++ b/lib/compat.h @@ -32,11 +32,9 @@ long long int be64toh(long long int x); #ifdef PS2_EE_PLATFORM -#include -#include +#include #include -#include #include #define getlogin_r(a,b) ENXIO diff --git a/lib/aes128ccm-test.c b/tests/aes128ccm-test.c similarity index 99% rename from lib/aes128ccm-test.c rename to tests/aes128ccm-test.c index fe1d1ee0..f5f9f09f 100644 --- a/lib/aes128ccm-test.c +++ b/tests/aes128ccm-test.c @@ -5,7 +5,7 @@ #include #include -#include "aes128ccm.h" +#include "lib/aes128ccm.h" void test_1(void) {