only include platform specific headers on PSP

This commit is contained in:
Dima Pulkinen 2024-03-03 13:56:28 +00:00
parent e2499fef6d
commit dedc7484c7
3 changed files with 3 additions and 5 deletions

View File

@ -18,7 +18,7 @@
#include "socket.h" #include "socket.h"
#include "timeout.h" #include "timeout.h"
#ifndef HAVE_GETADDRINFO #ifdef PSP
#include "getaddrinfo.h" #include "getaddrinfo.h"
#endif #endif

View File

@ -288,7 +288,7 @@ O_psp=o
CC_psp=psp-gcc CC_psp=psp-gcc
DEF_psp=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN DEF_psp=-DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN
CFLAGS_psp=$(LUAINC:%=-I%) $(PSPSDK:%=-I%)/include $(DEF) -Wall -Wshadow -Wextra \ CFLAGS_psp=$(LUAINC:%=-I%) $(PSPSDK:%=-I%)/include $(DEF) -Wall -Wshadow -Wextra \
-Wimplicit -O2 -ggdb3 -Wimplicit -O2 -ggdb3 -DHAVE_CONFIG_H -DSOCKET_SELECT -DNOIPV6
LDFLAGS_psp=$(LUALIB) && mv templib.a LDFLAGS_psp=$(LUALIB) && mv templib.a
LD_psp=psp-ar rcs templib.a LD_psp=psp-ar rcs templib.a
SOCKET_psp=usocket.o SOCKET_psp=usocket.o
@ -317,7 +317,7 @@ SOCKET=$(SOCKET_$(PLAT))
# #
CC=$(CC_$(PLAT)) CC=$(CC_$(PLAT))
DEF=$(DEF_$(PLAT)) DEF=$(DEF_$(PLAT))
CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT)) -DHAVE_CONFIG_H -DSOCKET_SELECT -DNOIPV6 CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT)) LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
LD=$(LD_$(PLAT)) LD=$(LD_$(PLAT))
LUAINC= $(LUAINC_$(PLAT)) LUAINC= $(LUAINC_$(PLAT))

View File

@ -32,9 +32,7 @@
#ifndef PSP #ifndef PSP
#include <net/if.h> #include <net/if.h>
#else #else
#ifndef HAVE_GETADDRINFO
#include "getaddrinfo.h" #include "getaddrinfo.h"
#endif
#ifndef INET6_ADDRSTRLEN #ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN INET_ADDRSTRLEN #define INET6_ADDRSTRLEN INET_ADDRSTRLEN