153 lines
4.2 KiB
Diff
153 lines
4.2 KiB
Diff
diff -Paur --no-dereference -- irssi.upstream/Makefile.in irssi/Makefile.in
|
|
--- irssi.upstream/Makefile.in
|
|
+++ irssi/Makefile.in
|
|
@@ -941,7 +941,8 @@
|
|
|
|
info-am:
|
|
|
|
-install-data-am: install-confDATA install-pkgconfigDATA \
|
|
+# PATCH: Don't install /etc/irssi.conf. Same configuration is built-in.
|
|
+install-data-am: install-pkgconfigDATA \
|
|
install-pkgincludeHEADERS
|
|
|
|
install-dvi: install-dvi-recursive
|
|
diff -Paur --no-dereference -- irssi.upstream/src/core/log.c irssi/src/core/log.c
|
|
--- irssi.upstream/src/core/log.c
|
|
+++ irssi/src/core/log.c
|
|
@@ -101,7 +101,10 @@
|
|
int log_start_logging(LOG_REC *log)
|
|
{
|
|
char *dir;
|
|
+/* PATCH: Sortix doesn't implement flock */
|
|
+#ifndef __sortix__
|
|
struct flock lock;
|
|
+#endif
|
|
|
|
g_return_val_if_fail(log != NULL, FALSE);
|
|
|
|
@@ -139,6 +142,8 @@
|
|
log->failed = TRUE;
|
|
return FALSE;
|
|
}
|
|
+/* PATCH: Sortix doesn't implement flock */
|
|
+#ifndef __sortix__
|
|
memset(&lock, 0, sizeof(lock));
|
|
lock.l_type = F_WRLCK;
|
|
if (fcntl(log->handle, F_SETLK, &lock) == -1 && errno == EACCES) {
|
|
@@ -148,6 +153,7 @@
|
|
log->failed = TRUE;
|
|
return FALSE;
|
|
}
|
|
+#endif
|
|
lseek(log->handle, 0, SEEK_END);
|
|
|
|
log->opened = log->last = time(NULL);
|
|
@@ -162,7 +168,10 @@
|
|
|
|
void log_stop_logging(LOG_REC *log)
|
|
{
|
|
+/* PATCH: Sortix doesn't implement flock */
|
|
+#ifndef __sortix__
|
|
struct flock lock;
|
|
+#endif
|
|
|
|
g_return_if_fail(log != NULL);
|
|
|
|
@@ -175,9 +184,12 @@
|
|
settings_get_str("log_close_string"),
|
|
"\n", time(NULL));
|
|
|
|
+/* PATCH: Sortix doesn't implement flock */
|
|
+#ifndef __sortix__
|
|
memset(&lock, 0, sizeof(lock));
|
|
lock.l_type = F_UNLCK;
|
|
fcntl(log->handle, F_SETLK, &lock);
|
|
+#endif
|
|
|
|
write_buffer_flush();
|
|
close(log->handle);
|
|
diff -Paur --no-dereference -- irssi.upstream/src/core/net-disconnect.c irssi/src/core/net-disconnect.c
|
|
--- irssi.upstream/src/core/net-disconnect.c
|
|
+++ irssi/src/core/net-disconnect.c
|
|
@@ -18,6 +18,8 @@
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
+#include <sys/select.h>
|
|
+
|
|
#include "module.h"
|
|
#include <irssi/src/core/network.h>
|
|
|
|
diff -Paur --no-dereference -- irssi.upstream/src/core/network.c irssi/src/core/network.c
|
|
--- irssi.upstream/src/core/network.c
|
|
+++ irssi/src/core/network.c
|
|
@@ -501,16 +501,8 @@
|
|
} else {
|
|
/* IPv4 */
|
|
ip->family = AF_INET;
|
|
-#ifdef HAVE_INET_ATON
|
|
- if (inet_aton(host, &ip->ip.s_addr) == 0)
|
|
+ if (inet_pton(AF_INET, host, &ip->ip) == 0)
|
|
return -1;
|
|
-#else
|
|
- addr = inet_addr(host);
|
|
- if (addr == INADDR_NONE)
|
|
- return -1;
|
|
-
|
|
- memcpy(&ip->ip, &addr, 4);
|
|
-#endif
|
|
}
|
|
|
|
return 0;
|
|
diff -Paur --no-dereference -- irssi.upstream/src/core/network.h irssi/src/core/network.h
|
|
--- irssi.upstream/src/core/network.h
|
|
+++ irssi/src/core/network.h
|
|
@@ -11,6 +11,11 @@
|
|
# include <netdb.h>
|
|
# include <arpa/inet.h>
|
|
|
|
+/* PATCH: Sortix netdb.h does not define HOST_NOT_FOUND */
|
|
+#ifndef HOST_NOT_FOUND
|
|
+#define HOST_NOT_FOUND 1
|
|
+#endif
|
|
+
|
|
#ifndef AF_INET6
|
|
# ifdef PF_INET6
|
|
# define AF_INET6 PF_INET6
|
|
diff -Paur --no-dereference -- irssi.upstream/src/core/refstrings.c irssi/src/core/refstrings.c
|
|
--- irssi.upstream/src/core/refstrings.c
|
|
+++ irssi/src/core/refstrings.c
|
|
@@ -122,7 +122,7 @@
|
|
mem += sizeof(char) * (strlen(key) + 1) + 2 * sizeof(void *);
|
|
}
|
|
|
|
- return g_strdup_printf("Shared strings: %ld, %dkB of data", count,
|
|
+ return g_strdup_printf("Shared strings: %zu, %dkB of data", count,
|
|
(int) (mem / 1024));
|
|
}
|
|
|
|
diff -Paur --no-dereference -- irssi.upstream/src/fe-common/core/fe-exec.c irssi/src/fe-common/core/fe-exec.c
|
|
--- irssi.upstream/src/fe-common/core/fe-exec.c
|
|
+++ irssi/src/fe-common/core/fe-exec.c
|
|
@@ -327,7 +327,7 @@
|
|
signal(SIGINT, SIG_IGN);
|
|
signal(SIGQUIT, SIG_DFL);
|
|
|
|
- putenv("TERM=tty");
|
|
+ setenv("TERM", "tty", 1);
|
|
|
|
/* set stdin, stdout and stderr */
|
|
dup2(in[0], STDIN_FILENO);
|
|
diff -Paur --no-dereference -- irssi.upstream/src/irc/core/irc.c irssi/src/irc/core/irc.c
|
|
--- irssi.upstream/src/irc/core/irc.c
|
|
+++ irssi/src/irc/core/irc.c
|
|
@@ -90,7 +90,7 @@
|
|
end = tmp;
|
|
|
|
if (tmp - cmd > MAX_IRC_USER_TAGS_LEN) {
|
|
- g_warning("irc_send_cmd_full(); tags too long(%ld)", tmp - cmd);
|
|
+ g_warning("irc_send_cmd_full(); tags too long(%td)", tmp - cmd);
|
|
while (tmp - cmd > MAX_IRC_USER_TAGS_LEN && cmd != tmp - 1) tmp--;
|
|
while (*tmp != ',' && cmd != tmp - 1) tmp--;
|
|
}
|