From: alex Date: Sat, 4 Sep 2021 20:41:07 +0000 (-0700) Subject: ... X-Git-Url: http://git.infiniteadaptability.org/?a=commitdiff_plain;h=3350609b988b8dae6b2179d2c8f5a6afc80af931;p=seeder ... --- diff --git a/Makefile.am b/Makefile.am index 3371098..aff6ed3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,3 @@ -AM_CPPFLAGS = \ - -I$(top_builddir)/inc/ \ - -I$(top_srcdir)/inc/ - bin_PROGRAMS = seederd seederd_SOURCES = \ diff --git a/configure.ac b/configure.ac index ddbe493..d1145bc 100644 --- a/configure.ac +++ b/configure.ac @@ -4,22 +4,25 @@ AC_INIT([seeder], [0.0.0]) # Store build files not in main directory AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([foreign subdir-objects nostdinc -Wall -Werror]) +AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror]) AC_CONFIG_SRCDIR([src/main.c]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([inc/config.h]) # Checks for programs. AC_PROG_CC # Checks for libraries. +AC_CHECK_LIB([pthread],[pthread_create]) # Checks for header files. AC_CHECK_HEADERS([stdlib.h]) # Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T # Checks for library functions. +AC_FUNC_MALLOC AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/inc/log.h b/inc/log.h index 63d16b3..8d3c19b 100644 --- a/inc/log.h +++ b/inc/log.h @@ -47,6 +47,6 @@ void log_entries_clean(); void log_flush(); void log_print(struct log_entry*); void log_message(enum log_level,FILE*,const char*,...); -void log_poll(); +void *log_poll(void*); #endif diff --git a/seederd b/seederd deleted file mode 100755 index c2136b1..0000000 Binary files a/seederd and /dev/null differ diff --git a/src/log.c b/src/log.c index 9b3ee6e..9a28062 100644 --- a/src/log.c +++ b/src/log.c @@ -115,7 +115,9 @@ void log_message(enum log_level level, FILE *out_stream, const char *format,...) va_end(args); } -void log_poll() { +void *log_poll(void *p) { while(1) { } + + return NULL; } diff --git a/src/setup.c b/src/setup.c index 7e6d37c..d1d8f4c 100644 --- a/src/setup.c +++ b/src/setup.c @@ -5,7 +5,7 @@ pthread_mutex_t logging_mutex = PTHREAD_MUTEX_INITIALIZER; int setup() { if(log_entries_init()<0) { return -1; } - if(pthread_create(&logging_thread,NULL,&log_poll)!=0) { + if(pthread_create(&logging_thread,NULL,&log_poll,NULL)!=0) { perror("pthread_create"); return -1; }