Skip to content

Fix building with musl libc #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dispatch/source.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#endif

#if !defined(_WIN32)
#include <sys/signal.h>
#include <signal.h>
#endif

DISPATCH_ASSUME_NONNULL_BEGIN
Expand Down
8 changes: 8 additions & 0 deletions os/generic_unix_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@

#if __has_include(<sys/cdefs.h>)
#include <sys/cdefs.h>
#else
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#endif

#ifndef API_AVAILABLE
Expand Down
2 changes: 1 addition & 1 deletion src/shims/getprogname.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const char *getprogname(void);
static inline char *
getprogname(void)
{
# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME || defined(__linux__)
return program_invocation_short_name;
# elif defined(__ANDROID__)
return __progname;
Expand Down
2 changes: 1 addition & 1 deletion tests/dispatch_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define HAS_SYS_EVENT_H 1
#include <sys/event.h>
#else
#include <sys/poll.h>
#include <poll.h>
#endif
#elif defined(_WIN32)
#include <Windows.h>
Expand Down