Linux console tools development discussion
 help / color / mirror / Atom feed
* [kbd] [PATCH 0/4] Some fixes for compilation with musl
@ 2014-12-04 19:56 Felix Janda
  0 siblings, 0 replies; only message in thread
From: Felix Janda @ 2014-12-04 19:56 UTC (permalink / raw)
  To: kbd

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");


		if (ioctl(fd, KDGETMODE, &mode) == -1) {
			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(-)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-04 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 19:56 [kbd] [PATCH 0/4] Some fixes for compilation with musl Felix Janda

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ \
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone