mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
1651d822a6
use new _iaxmodem uid, rather than uucp which was removed from base ages ago add an rc script
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
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"
|
|
@@ -184,6 +178,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"
|
|
@@ -997,12 +994,13 @@ 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("_iaxmodem [%s]",config);
|
|
|
|
- pwent = getpwnam("uucp");
|
|
+ pwent = getpwnam("_iaxmodem");
|
|
|
|
if (pwent == NULL) {
|
|
- printlog(LOG_ERROR, "Fatal error: uucp user not found in passwd file\n");
|
|
+ printlog(LOG_ERROR, "Fatal error: _iaxmodem user not found in passwd file\n");
|
|
_exit(-1);
|
|
}
|
|
|