diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-09-14 19:27:24 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-09-14 19:27:24 -0400 |
commit | 7a34dd3495d4bcd3dadc8b9fe2c89f819c15e7fd (patch) | |
tree | d33e1f855f4d3138f1d16527600b5fed332b7f3c | |
parent | bfba15c9b96c2a42bd02f51ff10596a23a677926 (diff) | |
download | musl-7a34dd3495d4bcd3dadc8b9fe2c89f819c15e7fd.tar.gz musl-7a34dd3495d4bcd3dadc8b9fe2c89f819c15e7fd.tar.xz musl-7a34dd3495d4bcd3dadc8b9fe2c89f819c15e7fd.zip |
fix overflow in sysconf for _SC_MQ_PRIO_MAX
the value of MQ_PRIO_MAX does not fit, so it needs to use OFLOW.
-rw-r--r-- | src/conf/sysconf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c index d979b626..5dc1e453 100644 --- a/src/conf/sysconf.c +++ b/src/conf/sysconf.c @@ -40,7 +40,7 @@ long sysconf(int name) [_SC_AIO_PRIO_DELTA_MAX] = 0, /* ?? */ [_SC_DELAYTIMER_MAX] = _POSIX_DELAYTIMER_MAX, [_SC_MQ_OPEN_MAX] = -1, - [_SC_MQ_PRIO_MAX] = MQ_PRIO_MAX, + [_SC_MQ_PRIO_MAX] = OFLOW, [_SC_VERSION] = VER, [_SC_PAGE_SIZE] = PAGE_SIZE, [_SC_RTSIG_MAX] = 63, /* ?? */ @@ -221,6 +221,7 @@ long sysconf(int name) } else if (values[name] == OFLOW) { if (name == _SC_ARG_MAX) return ARG_MAX; if (name == _SC_SEM_VALUE_MAX) return SEM_VALUE_MAX; + if (name == _SC_MQ_PRIO_MAX) return MQ_PRIO_MAX; } else if (values[name] == CPUCNT) { unsigned char set[128] = {1}; int i, cnt; |