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

Felix Janda <[email protected]>
Newsgroups dev.linux.lists.kbd
Message-ID <20141204195617.GA5691@euler>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.