*/
#define _LGPL_SOURCE
-#include <errno.h>
#include <urcu/list.h>
#include <string.h>
+#include <common/compat/errno.h>
#include <lttng/lttng.h>
#include <common/error.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <urcu/uatomic.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <errno.h>
#include <stdio.h>
#include "fd-limit.h"
#include <common/error.h>
+#include <common/compat/errno.h>
/* total count of fd. */
static long fd_count;
#include "lttng-ust-ctl.h"
#include <common/defaults.h>
#include <limits.h>
-#include <errno.h>
#include <ctype.h>
#include <common/error.h>
#include <common/utils.h>
+#include <common/compat/errno.h>
#include <common/compat/getenv.h>
static
*/
#define _LGPL_SOURCE
-#include <errno.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <urcu/compiler.h>
#include <signal.h>
+#include <common/compat/errno.h>
#include <common/common.h>
#include <common/sessiond-comm/sessiond-comm.h>
*/
#define _LGPL_SOURCE
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
+#include <common/compat/errno.h>
#include <common/common.h>
#include <common/consumer/consumer.h>
#include <common/defaults.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
+#include <common/compat/errno.h>
#include <common/common.h>
#include <common/utils.h>
libcompat_la_SOURCES = poll.c poll.h fcntl.h endian.h mman.h dirent.h \
socket.h compat-fcntl.c tid.h \
getenv.h string.h paths.h pthread.h netdb.h \
- time.h directory-handle.h directory-handle.c path.h
+ time.h directory-handle.h directory-handle.c path.h \
+ errno.h
--- /dev/null
+/*
+ * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ */
+
+#ifndef _COMPAT_ERRNO_H
+#define _COMPAT_ERRNO_H
+
+#include <errno.h>
+
+/* Missing on FreeBSD */
+#ifndef ENODATA
+#define ENODATA ENOATTR
+#endif
+
+#endif /* _COMPAT_ERRNO_H */
#define _COMPAT_FCNTL_H
#include <fcntl.h>
-#include <errno.h>
#include <sys/types.h>
+#include <common/compat/errno.h>
+
#if (defined(__CYGWIN__))
typedef long long off64_t;
#endif
#define _COMPAT_PTHREAD_H
#include <pthread.h>
-#include <errno.h>
+#include <common/compat/errno.h>
#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
static inline
#else
#include <signal.h>
-#include <errno.h>
+#include <common/compat/errno.h>
static inline
ssize_t lttng_recvmsg_nosigpipe(int sockfd, struct msghdr *msg)
#include <mach/mach.h>
#include <mach/clock.h>
-#include <errno.h>
+#include <common/compat/errno.h>
#undef NSEC_PER_SEC
#undef NSEC_PER_MSEC
#define _LGPL_SOURCE
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdlib.h>
#include <common/common.h>
#include <common/thread.h>
+#include <common/compat/errno.h>
#include <common/compat/getenv.h>
#include <lttng/lttng-error.h>
#ifndef _ERROR_H
#define _ERROR_H
-#include <errno.h>
+#include <common/compat/errno.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
+
+#include <common/compat/errno.h>
+
#include "filter-ast.h"
#include "filter-parser.h"
#include "filter-bytecode.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include "filter-ast.h"
#include "filter-parser.h"
#include "filter-bytecode.h"
#include "memstream.h"
+#include <common/compat/errno.h>
#include <common/macros.h>
#define WIDTH_u64_SCANF_IS_A_BROKEN_API "20"
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
#include <common/align.h>
+#include <common/compat/errno.h>
#include <common/compat/string.h>
#include "filter-bytecode.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include "filter-ast.h"
#include "filter-parser.h"
#include "filter-ir.h"
+#include <common/compat/errno.h>
#include <common/macros.h>
#include <common/string-utils/string-utils.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
+
+#include <common/compat/errno.h>
+
#include "filter-ast.h"
#include "filter-parser.h"
#include "filter-ir.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include "filter-ast.h"
#include "filter-parser.h"
#include "filter-ir.h"
+#include <common/compat/errno.h>
#include <common/macros.h>
static
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
+#include <common/compat/errno.h>
#include <common/macros.h>
#include <common/string-utils/string-utils.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
+#include <common/compat/errno.h>
#include <common/macros.h>
#include "filter-ast.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include <common/macros.h>
+#include <common/compat/errno.h>
#include "filter-ast.h"
#include "filter-parser.h"
#include <string.h>
#include <stdlib.h>
#include <assert.h>
-#include <errno.h>
#include <inttypes.h>
#include "filter-ast.h"
#include "filter-parser.h"
+#include <common/compat/errno.h>
#include <common/macros.h>
#define fprintf_dbg(fd, fmt, args...) fprintf(fd, "%s: " fmt, __func__, ## args)
#include <string.h>
#include <common/align.h>
#include <common/macros.h>
-#include <errno.h>
+#include <common/compat/errno.h>
#include <stdarg.h>
#include <assert.h>
#include <common/time.h>
#define _LGPL_SOURCE
#include <assert.h>
-#include <errno.h>
#include <limits.h>
#include <unistd.h>
+#include <common/compat/errno.h>
+
#include "readwrite.h"
/*
*/
#define _LGPL_SOURCE
-#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <common/lttng-kernel.h>
#include <common/common.h>
#include <common/utils.h>
+#include <common/compat/errno.h>
#include <common/compat/getenv.h>
#include <common/compat/string.h>
#include <common/unix.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
#include <fcntl.h>
#include <common/compat/time.h>
#include <poll.h>
#include <common/common.h>
#include <common/time.h>
+#include <common/compat/errno.h>
#include "inet.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
#include <fcntl.h>
#include <common/compat/time.h>
#include <poll.h>
#include <common/common.h>
#include <common/time.h>
+#include <common/compat/errno.h>
#include "inet6.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
#include <inttypes.h>
#include <common/common.h>
+#include <common/compat/errno.h>
#include "sessiond-comm.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
#include <lttng/constant.h>
+#include <common/compat/errno.h>
#include "error.h"
#include "macros.h"
#include "spawn-viewer.h"
#include <common/error.h>
#include <common/macros.h>
#include <common/error.h>
+#include <common/compat/errno.h>
#include <stddef.h>
#include <stdint.h>
#include <limits.h>
-#include <errno.h>
#include <pthread.h>
#include <locale.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
-#include <errno.h>
#include <common/common.h>
+#include <common/compat/errno.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/fd-handle.h>
#ifndef _LTTNG_USTCONSUMER_H
#define _LTTNG_USTCONSUMER_H
-#include <errno.h>
-
+#include <common/compat/errno.h>
#include <common/consumer/consumer.h>
#include <stdbool.h>
#include <sys/types.h>
#include <stdint.h>
#include <limits.h>
-#include <errno.h>
#include <string.h>
#include <lttng/health-internal.h>
#include <bin/lttng-relayd/health-relayd.h>
#include <common/defaults.h>
#include <common/utils.h>
+#include <common/compat/errno.h>
#include "lttng-ctl-helper.h"
#define _LGPL_SOURCE
#include <assert.h>
#include <grp.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <common/common.h>
+#include <common/compat/errno.h>
#include <common/compat/string.h>
#include <common/defaults.h>
#include <common/dynamic-buffer.h>
*/
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bin/lttng-relayd/lttng-viewer-abi.h>
#include <common/index/ctf-index.h>
+#include <common/compat/errno.h>
#include <common/compat/endian.h>
#define SESSION1 "test1"
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
-#include <errno.h>
#include <poll.h>
+#include <common/compat/errno.h>
#include <lttng/action/action.h>
#include <lttng/action/notify.h>
#include <lttng/condition/buffer-usage.h>
/* _GNU_SOURCE is defined by config.h */
#include <dlfcn.h>
#include <stdio.h>
-#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include <common/compat/errno.h>
+
/*
* libfoo has a direct dependency on libbar.
* libbar has a direct dependency on libzzz.
*/
#include <assert.h>
-#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <common/compat/directory-handle.h>
+#include <common/compat/errno.h>
#include <common/error.h>
#include <tap/tap.h>
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
-#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <urcu.h>
#include <common/compat/directory-handle.h>
+#include <common/compat/errno.h>
#include <common/error.h>
#include <common/fd-tracker/fd-tracker.h>
*/
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
+#include <common/compat/errno.h>
#include <bin/lttng-sessiond/trace-kernel.h>
#include <common/defaults.h>
*/
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tap/tap.h>
+#include <common/compat/errno.h>
#include <bin/lttng-sessiond/session.h>
#include <bin/lttng-sessiond/ust-app.h>
#include <bin/lttng-sessiond/ht-cleanup.h>
*/
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lttng/lttng.h>
#include <bin/lttng-sessiond/lttng-ust-abi.h>
#include <common/defaults.h>
+#include <common/compat/errno.h>
#include <bin/lttng-sessiond/trace-ust.h>
#include <bin/lttng-sessiond/ust-app.h>
#include <bin/lttng-sessiond/notification-thread.h>
#include <assert.h>
#include <common/compat/time.h>
#include <common/time.h>
-#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <stdbool.h>
#include <sys/types.h>
#include <unistd.h>
+#include <common/compat/errno.h>
+
#include "utils.h"
static inline