mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Fixes needed to compile with musl C library
Patch originally by Codarren Velvindron
This commit is contained in:
parent
07b8aefe90
commit
d80b8442a6
7 changed files with 18 additions and 9 deletions
|
@ -199,6 +199,7 @@ CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H)
|
|||
CHECK_INCLUDE_FILES (paths.h HAVE_PATHS_H)
|
||||
CHECK_INCLUDE_FILES (port.h HAVE_PORT_H)
|
||||
CHECK_INCLUDE_FILES (poll.h HAVE_POLL_H)
|
||||
CHECK_INCLUDE_FILES (sys/poll.h HAVE_SYS_POLL_H)
|
||||
CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H)
|
||||
CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H)
|
||||
CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
|
||||
|
|
|
@ -36,9 +36,11 @@ C_MODE_START
|
|||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_POLL
|
||||
#if defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif defined(HAVE_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#endif /* defined(HAVE_POLL_H) */
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
|
|
@ -47,9 +47,11 @@
|
|||
#include <sys/select.h>
|
||||
#endif
|
||||
#endif /* !defined(__WIN__) */
|
||||
#ifdef HAVE_POLL
|
||||
#if defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#elif defined(HAVE_SYS_POLL_H)
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#endif /* defined(HAVE_POLL_H) */
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
|
4
storage/mroonga/vendor/groonga/lib/com.c
vendored
4
storage/mroonga/vendor/groonga/lib/com.c
vendored
|
@ -348,7 +348,7 @@ grn_com_event_add(grn_ctx *ctx, grn_com_event *ev, grn_sock fd, int events, grn_
|
|||
struct epoll_event e;
|
||||
memset(&e, 0, sizeof(struct epoll_event));
|
||||
e.data.fd = (fd);
|
||||
e.events = (__uint32_t) events;
|
||||
e.events = (uint32_t) events;
|
||||
if (epoll_ctl(ev->epfd, EPOLL_CTL_ADD, (fd), &e) == -1) {
|
||||
SERR("epoll_ctl");
|
||||
return ctx->rc;
|
||||
|
@ -396,7 +396,7 @@ grn_com_event_mod(grn_ctx *ctx, grn_com_event *ev, grn_sock fd, int events, grn_
|
|||
struct epoll_event e;
|
||||
memset(&e, 0, sizeof(struct epoll_event));
|
||||
e.data.fd = (fd);
|
||||
e.events = (__uint32_t) events;
|
||||
e.events = (uint32_t) events;
|
||||
if (epoll_ctl(ev->epfd, EPOLL_CTL_MOD, (fd), &e) == -1) {
|
||||
SERR("epoll_ctl");
|
||||
return ctx->rc;
|
||||
|
|
6
storage/mroonga/vendor/groonga/lib/grn_com.h
vendored
6
storage/mroonga/vendor/groonga/lib/grn_com.h
vendored
|
@ -83,7 +83,11 @@ GRN_API grn_com_queue_entry *grn_com_queue_deque(grn_ctx *ctx, grn_com_queue *q)
|
|||
# define GRN_COM_POLLIN EVFILT_READ
|
||||
# define GRN_COM_POLLOUT EVFILT_WRITE
|
||||
# else /* USE_KQUEUE */
|
||||
# include <sys/poll.h>
|
||||
# if defined(HAVE_POLL_H)
|
||||
# include <poll.h>
|
||||
# elif defined(HAVE_SYS_POLL_H)
|
||||
# include <sys/poll.h>
|
||||
# endif /* defined(HAVE_POLL_H) */
|
||||
# define GRN_COM_POLLIN POLLIN
|
||||
# define GRN_COM_POLLOUT POLLOUT
|
||||
# endif /* USE_KQUEUE */
|
||||
|
|
|
@ -93,7 +93,7 @@ if (NOT HAVE_BACKTRACE_WITHOUT_EXECINFO)
|
|||
if (HAVE_BACKTRACE_WITH_EXECINFO)
|
||||
list(APPEND EXTRA_SYSTEM_LIBS execinfo)
|
||||
else ()
|
||||
message(FATAL_ERROR "Cannot find backtrace(), even with -lexecinfo.")
|
||||
message(WARNING "Cannot find backtrace(), even with -lexecinfo.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -831,7 +831,7 @@ void my_strerror(char *buf, size_t len, int nr)
|
|||
(defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \
|
||||
! defined _GNU_SOURCE
|
||||
strerror_r(nr, buf, len); /* I can build with or without GNU */
|
||||
#elif defined _GNU_SOURCE
|
||||
#elif defined(__GLIBC__) && defined (_GNU_SOURCE)
|
||||
char *r= strerror_r(nr, buf, len);
|
||||
if (r != buf) /* Want to help, GNU? */
|
||||
strmake(buf, r, len - 1); /* Then don't. */
|
||||
|
|
Loading…
Reference in a new issue