mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-27 04:43:52 +01:00
maybe windows support
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -181,13 +181,13 @@ int main(int argc, char **argv) {
|
||||
init_rds_encoder(&rdsEncoder);
|
||||
|
||||
if(open_udp_server(config.udp_port, &rdsModulator) == 0) {
|
||||
fprintf(stderr, "Reading control commands on UDP:%d.\n", config.udp_port);
|
||||
printf("Reading control commands on UDP:%d.\n", config.udp_port);
|
||||
int r = pthread_create(&udp_server_thread, &attr, udp_server_worker, NULL);
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Could not create UDP server thread.\n");
|
||||
config.udp_port = 0;
|
||||
goto exit;
|
||||
} else fprintf(stderr, "Created UDP server thread.\n");
|
||||
} else printf("Created UDP server thread.\n");
|
||||
} else {
|
||||
fprintf(stderr, "Failed to open UDP server\n");
|
||||
config.udp_port = 0;
|
||||
|
||||
Reference in New Issue
Block a user