diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-i18n/skkserv/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-i18n/skkserv/files')
-rw-r--r-- | app-i18n/skkserv/files/skkserv-headers.patch | 19 | ||||
-rw-r--r-- | app-i18n/skkserv/files/skkserv-segfault.patch | 15 | ||||
-rw-r--r-- | app-i18n/skkserv/files/skkserv-suffix.patch | 13 | ||||
-rw-r--r-- | app-i18n/skkserv/files/skkserv.initd | 19 |
4 files changed, 66 insertions, 0 deletions
diff --git a/app-i18n/skkserv/files/skkserv-headers.patch b/app-i18n/skkserv/files/skkserv-headers.patch new file mode 100644 index 000000000000..923f49948e8b --- /dev/null +++ b/app-i18n/skkserv/files/skkserv-headers.patch @@ -0,0 +1,19 @@ +--- a/skkserv/skkserv.h ++++ b/skkserv/skkserv.h +@@ -37,6 +37,8 @@ + /* Necessary for SunOS 3.x and maybe other old systems */ + + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + + #include <sys/types.h> + #ifdef HAVE_SYS_IOCTL_H +@@ -44,6 +46,7 @@ + #endif + #include <sys/socket.h> + #include <netinet/in.h> ++#include <arpa/inet.h> + #include <netdb.h> + #include <signal.h> + #include <errno.h> diff --git a/app-i18n/skkserv/files/skkserv-segfault.patch b/app-i18n/skkserv/files/skkserv-segfault.patch new file mode 100644 index 000000000000..4c35a44d975a --- /dev/null +++ b/app-i18n/skkserv/files/skkserv-segfault.patch @@ -0,0 +1,15 @@ +--- a/skkserv/skkserv.c ++++ b/skkserv/skkserv.c +@@ -723,7 +723,11 @@ + fprintf(errout, "%s:cannot get hostname, or too long hostname\n", pgmnm); + exit(1); + } +- hentry = gethostbyname(hname); ++ if ((hentry = gethostbyname(hname)) == NULL ++ && (hentry = gethostbyname("localhost")) == NULL) { ++ perror("gethostbyname"); ++ exit(1); ++ } + #ifdef NO_ADDR_LIST + strcat(hname, ":"); + strcat(hname, hentry->h_addr); diff --git a/app-i18n/skkserv/files/skkserv-suffix.patch b/app-i18n/skkserv/files/skkserv-suffix.patch new file mode 100644 index 000000000000..0e1f862fd148 --- /dev/null +++ b/app-i18n/skkserv/files/skkserv-suffix.patch @@ -0,0 +1,13 @@ +--- a/skkserv/skkserv.c ++++ a/skkserv/skkserv.c +@@ -382,6 +382,10 @@ + code = KANA_END; + + while ((c = fgetc(jisho)) != EOF) { ++ if (c == '>') { ++ fgets(buf, BUFSIZE, jisho); ++ continue; ++ } + target = ((c & 0xff)<< 8) | (fgetc(jisho) & 0xff); + if (target == STRMARK) { + fgets(buf, BUFSIZE, jisho); diff --git a/app-i18n/skkserv/files/skkserv.initd b/app-i18n/skkserv/files/skkserv.initd new file mode 100644 index 000000000000..0721205b355a --- /dev/null +++ b/app-i18n/skkserv/files/skkserv.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +description_reload="Reload the SKK-JISYO.L" + +command="/usr/sbin/${RC_SVCNAME}" + +depend() { + need net +} + +reload() { + ebegin "Reloading ${name:-${RC_SVCNAME}}" + start-stop-daemon --signal INT --name "${command}" + eend ${?} +} |