Skip to content

Commit

Permalink
Add support for <errno.h> in Evergreen and Modular builds fix
Browse files Browse the repository at this point in the history
Change-Id: Idb44248d7f5cfa8b54be581d2344b51ab533c9a9
  • Loading branch information
haozheng-cobalt committed Mar 27, 2024
1 parent 326d132 commit 73e0cd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include "starboard/elf_loader/exported_symbols.h"

#if SB_API_VERSION >= 16
#include <errno.h>
#endif // SB_API_VERSION < 16

#include <fcntl.h>
#include <ifaddrs.h>
#include <netdb.h>
Expand Down
5 changes: 1 addition & 4 deletions starboard/nplb/posix_compliance/posix_errno_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
// limitations under the License.

#include <errno.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>

#include "starboard/common/log.h"
#include "starboard/nplb/socket_helpers.h"
#include "starboard/nplb/posix_compliance/posix_socket_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace starboard {
Expand Down
2 changes: 2 additions & 0 deletions third_party/musl/src/starboard/errno/__errno_location.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if SB_API_VERSION < 16
#include <errno.h>
#include <stdlib.h>

Expand Down Expand Up @@ -39,3 +40,4 @@ int *__errno_location(void) {
}

weak_alias(__errno_location, ___errno_location);
#endif // SB_API_VERSION < 16

0 comments on commit 73e0cd4

Please sign in to comment.