diff options
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | s3_client.cpp | 2 | ||||
| -rw-r--r-- | srtserver.c | 19 | ||||
| -rw-r--r-- | transcode_talker.h | 1 |
4 files changed, 18 insertions, 9 deletions
@@ -2,10 +2,15 @@ CC := gcc CXX := g++ CFLAGS := -g -Wall CXXFLAGS := -g -Wall -std=c++14 +UNAME := $(shell uname -s) LDFLAGS := -g -lsrt \ -lavformat -lavutil -lavcodec \ -laws-cpp-sdk-core -laws-cpp-sdk-s3 +ifeq ($(findstring MINGW,$(UNAME)),MINGW) + LDFLAGS += -lws2_32 +endif + C_SOURCES := $(shell find . -maxdepth 1 -name '*.c') CPP_SOURCES := $(shell find . -maxdepth 1 -name '*.cpp') diff --git a/s3_client.cpp b/s3_client.cpp index 8ef235b..28ab669 100644 --- a/s3_client.cpp +++ b/s3_client.cpp @@ -29,8 +29,10 @@ void S3Client_init() { Aws::Auth::AWSCredentials credentials; config.endpointOverride = ezlive_config->endpoint; config.region = ezlive_config->region; +#if !defined(_WIN32) config.checksumConfig.requestChecksumCalculation = Aws::Client::RequestChecksumCalculation::WHEN_REQUIRED; config.checksumConfig.responseChecksumValidation = Aws::Client::ResponseChecksumValidation::WHEN_REQUIRED; +#endif credentials = Aws::Auth::AWSCredentials(ezlive_config->access_key, ezlive_config->secret_key); s3client = new Aws::S3::S3Client(credentials, nullptr, config); } diff --git a/srtserver.c b/srtserver.c index 97ce272..65bc46d 100644 --- a/srtserver.c +++ b/srtserver.c @@ -6,14 +6,17 @@ #include <assert.h> #include <stdarg.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <sys/poll.h> -#include <sys/time.h> -#include <unistd.h> -#include <fcntl.h> -#include <arpa/inet.h> -#include <time.h> +#if defined(_WIN32) + #include <winsock2.h> +#else + #include <sys/socket.h> + #include <netinet/in.h> + #include <sys/poll.h> + #include <sys/time.h> + #include <unistd.h> + #include <fcntl.h> + #include <arpa/inet.h> +#endif #include <srt/srt.h> diff --git a/transcode_talker.h b/transcode_talker.h index 4b0f301..9ec3817 100644 --- a/transcode_talker.h +++ b/transcode_talker.h @@ -3,7 +3,6 @@ #include "ringbuf.h" #include "pthread.h" -#include <bits/pthreadtypes.h> typedef struct { char *files[15]; |
