[kbd] [PATCH 0/4] Some fixes for compilation with musl

Felix Janda felix.janda at posteo.de
Thu Dec 4 23:56:17 MSK 2014


Patch 2-4 add missing headers and fix the compilation with
musl libc of the respective files.

Patch 1 is an unrelated encoding fix.


With these patches, kbd still does not compile with musl
because musl does not provide the non-standard error.h and
error(). Would it be ok to replace all invocations with
similar invocations of perror() and fprintf()?

For example in main() of kbdinfo.c, change

		if (ioctl(fd, KDGETMODE, &mode) == -1)
			error(EXIT_FAILURE, errno, "ioctl");

to

		if (ioctl(fd, KDGETMODE, &mode) == -1) {
			perror("ioctl");
			return EXIT_FAILURE;
		}

This changes the output slightly since error() also prints
the program name. Since however a mixture of error(), perror()
and fprintf() is used in the source anyway, the change
would increase the consistency of the output.

Felix Janda (4):
  src/kbdrate: iconv from iso-8859-2 to utf8
  libkeymap: include <sys/types.h> for u_short
  kbdrate.c, openvt.c: include <fcntl.h> for open()
  openvt.c: include <limits.h> for NAME_MAX

 src/kbdrate.c           | 3 ++-
 src/libkeymap/dump.c    | 1 +
 src/libkeymap/kmap.c    | 1 +
 src/libkeymap/summary.c | 1 +
 src/openvt.c            | 2 ++
 5 files changed, 7 insertions(+), 1 deletion(-)

-- 
2.0.4


More information about the kbd mailing list