Don't include popt.h on FreeBSD since it doesn't exist unless the port

is installed.  The getopt declarations are in <unistd.h> which is already
included.
This commit is contained in:
Steve Price 2001-07-25 17:37:59 +00:00
parent 9555847b00
commit 195cb0b942
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=45475

View file

@ -1,14 +1,12 @@
*** mix.c.orig Fri Mar 30 00:38:55 2001 *** mix.c.orig Fri Apr 20 11:52:28 2001
--- mix.c Sun Apr 1 22:54:26 2001 --- mix.c Sun Jul 22 12:19:34 2001
*************** ***************
*** 20,26 **** *** 20,26 ****
--- 20,30 ---- --- 20,28 ----
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
+ #ifdef __FreeBSD__ + #ifdef linux
+ #include <popt.h>
+ #else
#include <getopt.h> #include <getopt.h>
+ #endif + #endif
#include <time.h> #include <time.h>
@ -29,7 +27,7 @@
if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) { if ((mixer_fd = open(value("mixerdev"), O_RDWR)) == -1) {
printf("error: cannot open mixer device %s\n", value("mixerdev")); printf("error: cannot open mixer device %s\n", value("mixerdev"));
--- 891,905 ---- --- 889,903 ----
#ifdef CUSTOM #ifdef CUSTOM
#undef SOUND_DEVICE_NAMES #undef SOUND_DEVICE_NAMES
@ -59,7 +57,7 @@
for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) { for (count = 0; count < SOUND_MIXER_NRDEVICES; count++) {
if ((1 << count) & devmask) { if ((1 << count) & devmask) {
strcpy(mixer[nchannels].name, names[count]); strcpy(mixer[nchannels].name, names[count]);
--- 927,942 ---- --- 925,940 ----
exit(1); exit(1);
} }
@ -78,7 +76,7 @@
strcpy(mixer[nchannels].name, names[count]); strcpy(mixer[nchannels].name, names[count]);
*************** ***************
*** 946,951 **** *** 946,951 ****
--- 956,962 ---- --- 954,960 ----
printf("0"); printf("0");
} }
} }
@ -107,7 +105,7 @@
i = 0; i = 0;
/* this happens if mixer was changed by another program, /* this happens if mixer was changed by another program,
* so we need to update the values. We do not know, under OSS, * so we need to update the values. We do not know, under OSS,
--- 964,989 ---- --- 962,987 ----
{ {
int i; int i;
int left, right, foo; int left, right, foo;
@ -136,7 +134,7 @@
* so we need to update the values. We do not know, under OSS, * so we need to update the values. We do not know, under OSS,
*************** ***************
*** 1022,1028 **** *** 1022,1028 ****
--- 1040,1048 ---- --- 1038,1046 ----
} }
} }
} }