Skip to content

Commit e55e8a9

Browse files
authored
Merge pull request #10524 from JacobBarthelmeh/sgx
SGX build does not have fcntl.h
2 parents 4e491ed + 8c0d3b7 commit e55e8a9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

wolfcrypt/src/wc_port.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5178,7 +5178,8 @@ char* wolfSSL_strnstr(const char* s1, const char* s2, size_t n)
51785178
#endif /* not SINGLE_THREADED */
51795179

51805180
#if (defined(__unix__) || defined(__APPLE__)) && \
5181-
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_ZEPHYR)
5181+
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_ZEPHYR) && \
5182+
!defined(WOLFSSL_SGX)
51825183

51835184
#include <fcntl.h>
51845185
#include <errno.h>
@@ -5247,7 +5248,8 @@ int wc_accept_cloexec(int sockfd, void* addr, void* addrlen)
52475248
return fd;
52485249
}
52495250

5250-
#endif /* (__unix__ || __APPLE__) && !WOLFSSL_LINUXKM && !WOLFSSL_ZEPHYR */
5251+
#endif /* (__unix__ || __APPLE__) && !WOLFSSL_LINUXKM && !WOLFSSL_ZEPHYR &&
5252+
* !WOLFSSL_SGX */
52515253

52525254
#if defined(WOLFSSL_LINUXKM) && defined(CONFIG_ARM64) && \
52535255
defined(WC_SYM_RELOC_TABLES)

wolfssl/wolfcrypt/wc_port.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,8 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
18641864
#endif
18651865

18661866
#if (defined(__unix__) || defined(__APPLE__)) && \
1867-
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_ZEPHYR)
1867+
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_ZEPHYR) && \
1868+
!defined(WOLFSSL_SGX)
18681869
WOLFSSL_LOCAL void wc_set_cloexec(int fd);
18691870
WOLFSSL_LOCAL int wc_open_cloexec(const char* path, int flags);
18701871
WOLFSSL_LOCAL int wc_socket_cloexec(int domain, int type, int protocol);

0 commit comments

Comments
 (0)