This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/main by this push:
     new c1ff9d39 DISPATCH-2368: chore(build): add missing `#include 
<sys/time.h>` (#1736)
c1ff9d39 is described below

commit c1ff9d39c479060cb66c0421362081992cd3c403
Author: Jiri DanÄ›k <[email protected]>
AuthorDate: Mon Jan 13 11:11:52 2025 +0100

    DISPATCH-2368: chore(build): add missing `#include <sys/time.h>` (#1736)
    
    Fixes compilation failures such as this one
    
    ```
    error: call to undeclared function 'gettimeofday'; ISO C99 and later do not 
support implicit function declarations [-Wimplicit-function-declaration]
    ```
---
 src/alloc_pool.c | 1 +
 src/dispatch.c   | 1 +
 src/log.c        | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/alloc_pool.c b/src/alloc_pool.c
index 5087e9e8..12a22269 100644
--- a/src/alloc_pool.c
+++ b/src/alloc_pool.c
@@ -37,6 +37,7 @@
 #ifdef QD_MEMORY_DEBUG
 #include "log_private.h"
 
+#include <sys/time.h>
 #include <execinfo.h>
 #endif
 
diff --git a/src/dispatch.c b/src/dispatch.c
index 9fdaa5c2..b1432554 100644
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -41,6 +41,7 @@
 #include <dlfcn.h>
 #include <inttypes.h>
 #include <stdlib.h>
+#include <sys/time.h>
 
 /**
  * Private Function Prototypes
diff --git a/src/log.c b/src/log.c
index 3bb1dd68..f0156be5 100644
--- a/src/log.c
+++ b/src/log.c
@@ -37,6 +37,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <syslog.h>
+#include <sys/time.h>
 
 #define TEXT_MAX QD_LOG_TEXT_MAX
 #define LOG_MAX (QD_LOG_TEXT_MAX+128)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to