From: Daniel Sabogal <dsabogalcc@gmail.com>
To: musl@lists.openwall.com
Subject: [PATCH] add missing confstr constants
Date: Sun, 4 Sep 2016 10:42:47 -0400 [thread overview]
Message-ID: <20160904144248.9208-1-dsabogalcc@gmail.com> (raw)
the _CS_V6_ENV and _CS_V7_ENV constants are required to be available for use
with confstr. glibc defines these constants with values 1148 and 1149,
respectively.
the only missing (and required) confstr constants are
_CS_POSIX_V7_THREADS_CFLAGS and _CS_POSIX_V7_THREADS_LDFLAGS which remain
unavailable in glibc.
---
include/unistd.h | 2 ++
src/conf/confstr.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/unistd.h b/include/unistd.h
index 760a165..2c35588 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -457,6 +457,8 @@ int eaccess(const char *, int);
#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 1145
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 1146
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147
+#define _CS_V6_ENV 1148
+#define _CS_V7_ENV 1149
#ifdef __cplusplus
}
diff --git a/src/conf/confstr.c b/src/conf/confstr.c
index 6e9c23a..02cb1aa 100644
--- a/src/conf/confstr.c
+++ b/src/conf/confstr.c
@@ -7,7 +7,7 @@ size_t confstr(int name, char *buf, size_t len)
const char *s = "";
if (!name) {
s = "/bin:/usr/bin";
- } else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>31U) {
+ } else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>33U) {
errno = EINVAL;
return 0;
}
--
2.10.0
next reply other threads:[~2016-09-04 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 14:42 Daniel Sabogal [this message]
2016-09-04 14:42 ` [PATCH] fix typo in utmpx.h Daniel Sabogal
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=20160904144248.9208-1-dsabogalcc@gmail.com \
--to=dsabogalcc@gmail.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).