chiark / gitweb /
Deal with glibc-2.28
[elogind.git] / src / basic / missing.h
index 03b954d17c85b49cd38cc63f1b4e5b969ac93680..9be48eef888e66755d5911dbfacb6e2ad2f79e82 100644 (file)
@@ -1,12 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-***/
-
 /* Missing glibc definitions to access certain kernel APIs */
 
 #include <errno.h>
@@ -1377,7 +1371,7 @@ struct fib_rule_uid_range {
 #define PF_KTHREAD 0x00200000
 #endif
 
-#if ! HAVE_STRUCT_STATX
+#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H && !HAVE_STRUCT_STATX_IN_LINUX_STAT_H
 struct statx_timestamp {
         int64_t tv_sec;
         uint32_t tv_nsec;
@@ -1416,4 +1410,11 @@ struct statx {
 #define AT_STATX_DONT_SYNC 0x4000
 #endif
 
+/* The maximum thread/process name length including trailing NUL byte. This mimics the kernel definition of the same
+ * name, which we need in userspace at various places but is not defined in userspace currently, neither under this
+ * name nor any other. */
+#ifndef TASK_COMM_LEN
+#define TASK_COMM_LEN 16
+#endif
+
 #include "missing_syscall.h"