0
1
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:
2025-12-28 22:06:09 +01:00
parent 1d329fe308
commit cd7dbff03b
2 changed files with 4 additions and 2 deletions

View File

@@ -4,7 +4,9 @@
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#endif
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include <stdbool.h> #include <stdbool.h>

View File

@@ -181,13 +181,13 @@ int main(int argc, char **argv) {
init_rds_encoder(&rdsEncoder); init_rds_encoder(&rdsEncoder);
if(open_udp_server(config.udp_port, &rdsModulator) == 0) { 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); int r = pthread_create(&udp_server_thread, &attr, udp_server_worker, NULL);
if (r < 0) { if (r < 0) {
fprintf(stderr, "Could not create UDP server thread.\n"); fprintf(stderr, "Could not create UDP server thread.\n");
config.udp_port = 0; config.udp_port = 0;
goto exit; goto exit;
} else fprintf(stderr, "Created UDP server thread.\n"); } else printf("Created UDP server thread.\n");
} else { } else {
fprintf(stderr, "Failed to open UDP server\n"); fprintf(stderr, "Failed to open UDP server\n");
config.udp_port = 0; config.udp_port = 0;