mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-28 15:06:02 -05:00
Make wavstreamer compile under win32
This commit is contained in:
parent
a9cb506963
commit
fb1b1f8f1c
@ -32,7 +32,14 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_GETOPT_H
|
||||||
|
# include "getopt.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
char *av0;
|
char *av0;
|
||||||
|
|
||||||
@ -271,7 +278,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
sec = strtoul(optarg, &end, 10);
|
sec = strtoul(optarg, &end, 10);
|
||||||
if ((*optarg == '-') || (end == optarg) || ((*end != '\0') && (*end != '.'))) {
|
if ((optarg[0] == '-') || (end == optarg) || ((end[0] != '\0') && (end[0] != '.'))) {
|
||||||
fprintf(stderr, "%s: Invalid -l argument.\n", av0);
|
fprintf(stderr, "%s: Invalid -l argument.\n", av0);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
} else if (*end == '.') {
|
} else if (*end == '.') {
|
||||||
@ -302,7 +309,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
samples = strtoul(optarg, &end, 10);
|
samples = strtoul(optarg, &end, 10);
|
||||||
if ((*optarg == '-') || (end == optarg) || (*end != '\0')) {
|
if ((optarg[0] == '-') || (end == optarg) || (end[0] != '\0')) {
|
||||||
fprintf(stderr, "%s: Invalid -s argument.\n", av0);
|
fprintf(stderr, "%s: Invalid -s argument.\n", av0);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user