diff options
author | Diane Bruce <db@FreeBSD.org> | 2020-08-24 14:53:12 +0000 |
---|---|---|
committer | Diane Bruce <db@FreeBSD.org> | 2020-08-24 14:53:12 +0000 |
commit | f34877a2023513dc64f95748713da48884510096 (patch) | |
tree | 0853e03c46a7ffa41392b492da31502cb9913c71 /comms/echolinux/files/patch-echolinux_vox.c | |
parent | Update to latest commit. (diff) |
- Renamed bogus patch names
- Make build under clang11
- Fixed bogus /etc dir reference
- pet portlint
Notes
Notes:
svn path=/head/; revision=546089
Diffstat (limited to 'comms/echolinux/files/patch-echolinux_vox.c')
-rw-r--r-- | comms/echolinux/files/patch-echolinux_vox.c | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/comms/echolinux/files/patch-echolinux_vox.c b/comms/echolinux/files/patch-echolinux_vox.c new file mode 100644 index 000000000000..130a03cf9cb5 --- /dev/null +++ b/comms/echolinux/files/patch-echolinux_vox.c @@ -0,0 +1,111 @@ +--- echolinux/vox.c.orig 2006-03-03 23:43:05 UTC ++++ echolinux/vox.c +@@ -14,7 +14,7 @@ $Log$ + #include <stdlib.h> + #include <sys/ioctl.h> + #include <sys/stat.h> +-#include <linux/soundcard.h> ++#include <sys/soundcard.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> +@@ -70,7 +70,7 @@ int mode; + + /**************** read info file ***********/ + +-int sendInfoFile(void){ ++static int sendInfoFile(void){ + int count = 0, result; + char *temp, line[80]; + +@@ -79,7 +79,7 @@ int sendInfoFile(void){ + + infoFile = open(line, O_RDONLY); + if(infoFile < 0){ +- infoFile = open("/etc/echolinux/info.txt", O_RDONLY); ++ infoFile = open("%%LOCALBASE%%/etc/echolinux/info.txt", O_RDONLY); + if(infoFile < 0){ + perror("Openning info file."); + return(FALSE); +@@ -129,12 +129,12 @@ int sendInfoFile(void){ + (struct sockaddr *) &destAddr, + sizeof destAddr); + +- ++ return(TRUE); + } + + /****************************************/ + +-int soundInput(void){ ++static void soundInput(void){ + + // int arg, status; + int arg, status; +@@ -242,7 +242,7 @@ void sendNDATA(char *ndata){ + + /**************** Handle data from stdin ***********/ + +-int fromControl(void){ ++static void fromControl(void){ + int i; + char c; + char line[80], fileName[80], globalFileName[80]; +@@ -260,7 +260,7 @@ int fromControl(void){ + strcpy(fileName, echoLinuxDefaults); + line[strlen(line) - 1] = 0x00; + strcat(fileName, &line[2]); +- strcpy(globalFileName, "/etc/echolinux/"); ++ strcpy(globalFileName, "%%LOCALBASE%%/etc/echolinux/"); + strcat(globalFileName, &line[2]); + // strcat(fileName, "connect.wav"); + if(((audioEffect = open(fileName, O_RDONLY)) != -1) || (audioEffect = open(globalFileName, O_RDONLY)) != -1){ +@@ -305,14 +305,14 @@ int fromControl(void){ + + /******************* Audio sending routine **************/ + +-int sendAudio(void){ ++static void sendAudio(void){ + + static short seq = 1; + short count = 0, total = 0; + short i, result, *pTemp, j; + char c, *temp, line[20]; + fd_set readfds, testfds; +- int len_inet; ++ socklen_t len_inet; + // struct timeval timeout; + time_t startTime, timeNow; + long average; +@@ -399,7 +399,7 @@ int sendAudio(void){ + } + } + if(sendStrength){ +- sprintf(line, "%C %d", STRENGTH, average); ++ sprintf(line, "%C %ld", STRENGTH, average); + puts(line); + } + +@@ -477,11 +477,11 @@ int sendAudio(void){ + + /************ Audio Receiving Function *******/ + +-int recvAudio(void){ ++static void recvAudio(void){ + struct gsmVoice_t *voicePacket; + fd_set readfds, testfds; + short i, result, j, *pTemp; +- int len_inet; ++ socklen_t len_inet; + audio_buf_info info; + unsigned char *temp; + char c, line[20]; +@@ -559,7 +559,7 @@ int recvAudio(void){ + } + average = average / 320; + if(sendStrength){ +- sprintf(line, "%C %d", STRENGTH, average); ++ sprintf(line, "%C %ld", STRENGTH, average); + puts(line); + } + } |