]> infiniteadaptability.org Git - seeder/commitdiff
...
authoralex <[email protected]>
Sat, 4 Sep 2021 20:41:07 +0000 (13:41 -0700)
committeralex <[email protected]>
Sat, 4 Sep 2021 20:41:07 +0000 (13:41 -0700)
Makefile.am
configure.ac
inc/log.h
seederd [deleted file]
src/log.c
src/setup.c

index 3371098a1f0c9f989e03b21a1351b0085ddbee92..aff6ed3b795ff1ee9a15f7317dfee688d6393a38 100644 (file)
@@ -1,7 +1,3 @@
-AM_CPPFLAGS = \
-       -I$(top_builddir)/inc/ \
-       -I$(top_srcdir)/inc/
-
 bin_PROGRAMS = seederd
 
 seederd_SOURCES = \
index ddbe49341c586e1d3fe3a11a1fa043f5f865b26c..d1145bc3ede34ae9548482c775460cb153050ef4 100644 (file)
@@ -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
index 63d16b387e591661784c67865b50a9b5ea14883c..8d3c19b37c7ea1ff29367a4392e5f46285f6377d 100644 (file)
--- 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 (executable)
index c2136b1..0000000
Binary files a/seederd and /dev/null differ
index 9b3ee6ebe1799f9dc1402e2a0fbdaebb1529e5c8..9a280626c8ea9be537118403cc22ae9b05fe702f 100644 (file)
--- 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;
 }
index 7e6d37c3146dced7b4e43a74291a40109434d612..d1d8f4ce69dec6a3729df1e34013fdf1e9b126d3 100644 (file)
@@ -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;
        }