All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/5] lapi: Add utsname.h
Date: Sun,  7 Jul 2019 21:00:13 +0200	[thread overview]
Message-ID: <20190707190016.27296-3-petr.vorel@gmail.com> (raw)
In-Reply-To: <20190707190016.27296-1-petr.vorel@gmail.com>

Non-standard _UTSNAME_DOMAIN_LENGTH and _UTSNAME_LENGTH constants aren't
defined for MUSL and Bionic.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 configure.ac           |  1 +
 include/lapi/utsname.h | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 include/lapi/utsname.h

diff --git a/configure.ac b/configure.ac
index f78db90ce..97991e85f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,7 @@ AC_CHECK_HEADERS([ \
     sys/prctl.h \
     sys/shm.h \
     sys/ustat.h \
+    sys/utsname.h \
     sys/xattr.h \
 ])
 
diff --git a/include/lapi/utsname.h b/include/lapi/utsname.h
new file mode 100644
index 000000000..6209eac47
--- /dev/null
+++ b/include/lapi/utsname.h
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 Petr Vorel <petr.vorel@gmail.com>
+ */
+
+#ifdef HAVE_SYS_UTSNAME_H
+# include <sys/utsname.h>
+#endif
+
+#ifndef _UTSNAME_LENGTH
+# define _UTSNAME_LENGTH 65
+#endif
+
+#ifndef _UTSNAME_DOMAIN_LENGTH
+# define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH
+#endif
-- 
2.20.1


  parent reply	other threads:[~2019-07-07 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07 19:00 [LTP] [PATCH 0/5] setdomainname() converted to new API Petr Vorel
2019-07-07 19:00 ` [LTP] [PATCH 1/5] lib: include <errno.h> in tst_test.h Petr Vorel
2019-07-09 10:55   ` Cyril Hrubis
2019-07-09 20:51     ` Petr Vorel
2019-07-07 19:00 ` Petr Vorel [this message]
2019-07-17 16:50   ` [LTP] [PATCH 2/5] lapi: Add utsname.h Petr Vorel
2019-07-07 19:00 ` [LTP] [PATCH 3/5] setdomainname01: Convert to new API Petr Vorel
2019-07-07 19:00 ` [LTP] [PATCH 4/5] setdomainname02: " Petr Vorel
2019-07-07 19:00 ` [LTP] [PATCH 5/5] setdomainname03: " Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190707190016.27296-3-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.