Skip to content

Commit

Permalink
Merge pull request #276 from Wolf3s/ps2_updates
Browse files Browse the repository at this point in the history
ps2: Add missing HAVE_TIME_H and add HAVE_FCNTL_H
  • Loading branch information
sahlberg authored Nov 13, 2023
2 parents aec5aab + 69bb90d commit a9e9b2e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ AC_CHECK_HEADERS([time.h])
dnl Check for strings.h
AC_CHECK_HEADERS([strings.h])

dnl Check for fcntl.h
AC_CHECK_HEADERS([fcntl.h])

dnl Check if sockaddr data struct includes a "sa_len"
AC_CHECK_MEMBER([struct sockaddr.sa_len], [
AC_DEFINE([HAVE_SOCKADDR_LEN], [1], [Whether sockaddr struct has sa_len])
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.PS2_EE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EE_CFLAGS = -DPS2_EE_PLATFORM -DHAVE_STDINT_H -DHAVE_STRING_H \
-DHAVE_STDLIB_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_SYS_STAT_H -DHAVE_TIME_H \
-DHAVE_STDLIB_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_SYS_STAT_H -DHAVE_TIME_H -DHAVE_FCNTL \
-D_U_=/**/ -I../include -I../include/smb2

EE_LIB = libsmb2.a
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.PS3_PPU
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DATA := data
LIBS :=

MACHDEP := -DPS3_PPU_PLATFORM -DHAVE_STDINT_H -DHAVE_STRING_H \
-DHAVE_STDLIB_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_TIME_H -D_U_=/**/
-DHAVE_STDLIB_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_TIME_H -DHAVE_FCNTL -D_U_=/**/

CFLAGS += -O2 -Wall -mcpu=cell $(MACHDEP) -fno-strict-aliasing $(INCLUDES)

Expand Down
5 changes: 4 additions & 1 deletion lib/libsmb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
#include <errno.h>
#include <stdio.h>

#ifndef PS2_IOP_PLATFORM
#ifdef HAVE_TIME_H
#include <time.h>
#endif

#if !defined(PS2_IOP_PLATFORM) || defined(__GNUC__) || defined(HAVE_TIME_H) || defined(_MSC_VER)
#include <fcntl.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion lib/ntlmssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include "portable-endian.h"
#include <stdio.h>

#ifndef PS2_IOP_PLATFORM
#ifdef HAVE_TIME_H
#include <time.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion lib/pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <string.h>
#endif

#ifndef PS2_IOP_PLATFORM
#ifdef HAVE_TIME_H
#include <time.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion lib/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#include "portable-endian.h"
#include <errno.h>

#if !defined(PS2_IOP_PLATFORM)
#if !defined(PS2_IOP_PLATFORM) || defined(__GNUC__) || defined(HAVE_TIME_H) || defined(_MSC_VER)
#include <fcntl.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion lib/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#include "compat.h"

#ifndef PS2_IOP_PLATFORM
#ifdef HAVE_TIME_H
#include <time.h>
#endif

Expand Down

0 comments on commit a9e9b2e

Please sign in to comment.