I have validated that we are still compatible at least back to
- openSUSE 11.4
- SLE 11
- RHEL/CentOS 6
- OSX 10.10.x, (Xcode 6.3)
- FreeBSD 10.2
Confirmed incompatibility:
- OSX 10.9.x, (Xcode 6.2)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Commit 42f15e9848 introduced a certain
inaccuracy in -c option description; it is not _the option with an argument_,
but it is the flag that changes interpretation of `mask` parameter.
The difference is almost not noticeable, but there are one corner case where it is:
taskset -c 1 -p $$
fails (but it would work if 42f15e was correct). Instead,
taskset -c -p 1 $$
works (but it should not have if 42f15e was correct).
Signed-off-by: Karel Zak <kzak@redhat.com>
While the header says C/H/S the actual numbers where printed as
C/S/H.
Addresses: http://bugs.debian.org/815847
Reported-by: "groups, freeman" <freeman_groups@reason.dyndns.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* 'port-osx' of https://github.com/rudimeier/util-linux:
lib: include strutils.h for mempcpy()
build-sys: remove duplicate cal sources
lib: provide fallback if mkostemp(3) missing
build-sys: chrt requires a sched_set* function
build-sys: add --disable-ipcrm --disable-ipcs
build-sys: disable login-utils if shadow.h or utmp.h is missing
login-utils: minor utmp cleanup
build-sys: build_init should check for flock
newgrp: rename memset_s()
misc: fix some includes
libsmartcols: fix uninitialized variable
fdisk: fix warning, incompatible pointer types passing 'uint64_t *'
logger: use SCM_CREDENTIALS on LINUX only
Depending on architecture and kernel version, personality
syscall is either capable or incapable of returning an error.
If the return value is not an error, then it's the previous
personality value, which can be an arbitrary value
undistinguishable from an error value.
To make things clear, a second call is needed.
For more details about personality syscall peculiarities see
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=glibc-2.22-637-ge0043e17dfc5
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
We have that mempcpy fallback since 2013 (02887b73) but forgot to
include it.
This fixes a segfault of cal(1) on FreeBSD and OSX.
Compiler warning was:
lib/mbsalign.c:468:14: warning: implicit declaration of function 'mempcpy' is invalid in C99 [-Wimplicit-function-declaration]
dest = mempcpy (dest, str_to_print, min (n_used_bytes, space_left));
^
lib/mbsalign.c:468:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
dest = mempcpy (dest, str_to_print, min (n_used_bytes, space_left));
CC: Daniel Trebbien <dtrebbien@gmail.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
These extra sources should have been removed since cal is
linked against libcommon (see 7b353df2).
CC: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
ipcs's source history looks like some people are using it on BSD
but it won't build on most non-Linux systems. That's why it's nice
let "./configure --disable-ipcrm --disable-ipcs" work.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Actually we could have also used UL_REQUIRES_LINUX because our
utmp usage and the shadow.h header is unlikely to be portable.
However only requiring these headers may help others who are
curious what needs to be done to port something.
Note, we could easily make the utmp stuff more portable by using
utmpx which is POSIX standard and on LINUX (glibc) basically just
renaming work. See getutxent(3).
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
features.h: any glibc header includes this already
libgen.h: was unused there
sys/uio.h: for writev(3p)
sys/queue.h seems like it was never used
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This is a build fix of FreeBSD and OSX. Basically we revert
the following commit for non-linux systems:
27a9eb53 "use --id as local socket credentials"
Note I could also compile it like this:
#ifdef HAVE_SYS_UCRED_H
# define _WANT_UCRED
# include <sys/param.h>
# include <sys/ucred.h>
# define SCM_CREDENTIALS SCM_CREDS
#endif
[...]
#ifdef _linux_
cred->pid = ctl->pid;
#endif
[...]
... but don't know how to test whether it does what it
should.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
These ones should be fixed:
libblkid/src/probe.c:393:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/probe.c:907:25: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libblkid/src/probe.c:1221:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:540:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:1043:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:1056:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:1057:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:1061:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/partitions/partitions.c:1199:27: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libblkid/src/partitions/partitions.c:1410:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libblkid/src/partitions/partitions.c:1431:25: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libblkid/src/superblocks/linux_raid.c:151:8: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libblkid/src/superblocks/linux_raid.c:155:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libblkid/src/superblocks/superblocks.c:375:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libblkid/src/superblocks/xfs.c:141:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libsmartcols/src/table.c:333:24: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libsmartcols/src/table.c:344:25: warning: signed and unsigned type in conditional expression [-Wsign-compare]
libsmartcols/src/table_print.c:753:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/ask.c:364:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/utils.c:33:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/context.c:435:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/context.c:730:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/script.c:557:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/dos.c:1791:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libfdisk/src/gpt.c:813:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
misc-utils/logger.c:408:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
disk-utils/partx.c:140:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
disk-utils/partx.c:551:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
disk-utils/partx.c:640:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Looks like it got lost in ce4dd666.
Compiler warning discoverd this issue:
libmount/src/fs.c:1171:5: warning: no previous prototype for 'mnt_fs_set_priority' [-Wmissing-prototypes]
int mnt_fs_set_priority(struct libmnt_fs *fs, int prio)
^
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
We were missing our nice compliler warnings for many programs
and libs. See next commits how many trivial and non-trival
warnings have to be fixed.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This was a major showstopper when building on a system where
LTLIBINTL libs are needed (e.g. OSX). Maybe there are a few test
programs which wouldn't need LDADD ... never mind.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
__P() is used for compatibility with old K&R C compilers. With
ANSI C this macro has no effect.
This fixes a compilation error with musl libc because of undeclared
__P.
Ref:
https://lists.samba.org/archive/samba-technical/2015-June/108042.html
Signed-off-by: Romain Naour <romain.naour@gmail.com>