ports/telephony/iaxmodem/patches/patch-iaxmodem_c

57 lines
1.2 KiB
Text

Index: iaxmodem.c
--- iaxmodem.c.orig
+++ iaxmodem.c
@@ -21,16 +21,8 @@
#include <string.h>
#include <strings.h>
-#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
-# ifndef USE_UNIX98_PTY
-# include <pty.h>
-# endif /* !USE_UNIX98_PTY */
-# include <termios.h>
-#else
-#if !defined(__FreeBSD__)
-# include <util.h>
-#endif
-#endif
+#include <termios.h>
+#include <util.h>
#include <stdlib.h>
#include <unistd.h>
@@ -61,11 +53,13 @@
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
#include <spandsp.h>
-#ifdef STATICLIBS
+/* #ifdef STATICLIBS */
#include <iax-client.h>
+/*
#else
#include <iax/iax-client.h>
#endif
+ */
#ifndef MODEMVER
#define MODEMVER "0.0.0"
@@ -169,6 +163,9 @@ int logmode = S_IRUSR | S_IWUSR | S_IRGRP;
#include "compat/headers.h"
#include "sys/stropts.h"
#endif
+#ifdef __OpenBSD__
+#include "compat/strings.c"
+#endif
#ifdef __FreeBSD__
#include "compat/strndup-freebsd.c"
@@ -697,7 +694,8 @@ iaxmodem(const char *config, int nondaemon)
int fd;
char logfile[256];
- printlog(LOG_ERROR, "Modem started\n");
+ printlog(LOG_ERROR, "Modem %s started\n", config);
+ setproctitle("uucp [%s]",config);
pwent = getpwnam("uucp");