Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: storage size of 'tm_buf' isn't known due to missing #include <time.h> #370

Closed
OlekMazur opened this issue Jan 5, 2024 · 1 comment

Comments

@OlekMazur
Copy link
Contributor

Compilation error:

  CC       lib/xfrm/libnl_xfrm_3_la-ae.lo
lib/xfrm/ae.c: In function 'xfrm_ae_dump_line':
lib/xfrm/ae.c:340:29: error: storage size of 'tm_buf' isn't known
  340 |         struct tm           tm_buf;
      |                             ^~~~~~
lib/xfrm/ae.c:360:31: warning: implicit declaration of function 'gmtime_r' [-Wimplicit-function-declaration]
  360 |                 add_time_tm = gmtime_r (&add_time, &tm_buf);
      |                               ^~~~~~~~
lib/xfrm/ae.c:361:17: warning: implicit declaration of function 'strftime' [-Wimplicit-function-declaration]
  361 |                 strftime (flags, 128, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:138:1: note: include '<time.h>' or provide a declaration of 'strftime'
  137 | #include "nl-aux-xfrm/nl-xfrm.h"
  +++ |+#include <time.h>
  138 | 
lib/xfrm/ae.c:361:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  361 |                 strftime (flags, 128, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:361:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/ae.c:372:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  372 |                 strftime (buf, 128, "%Y-%m-%d %H-%M-%S", use_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:372:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/ae.c:340:29: warning: unused variable 'tm_buf' [-Wunused-variable]
  340 |         struct tm           tm_buf;
      |                             ^~~~~~
make: *** [Makefile:5209: lib/xfrm/libnl_xfrm_3_la-ae.lo] Błąd 1
Command exited with non-zero status 2
0.14user 0.04system 0:00.24elapsed 79%CPU (0avgtext+0avgdata 25728maxresident)k
40472inputs+40outputs (226major+9158minor)pagefaults 0swaps

olek@mocarz:~/projekty/videorejestrator/intermediate/packages/libnl-3.9.0$ PATH=/usr/local/cross/bin:$PATH time make -k
  CC       lib/xfrm/libnl_xfrm_3_la-ae.lo
lib/xfrm/ae.c: In function 'xfrm_ae_dump_line':
lib/xfrm/ae.c:340:29: error: storage size of 'tm_buf' isn't known
  340 |         struct tm           tm_buf;
      |                             ^~~~~~
lib/xfrm/ae.c:360:31: warning: implicit declaration of function 'gmtime_r' [-Wimplicit-function-declaration]
  360 |                 add_time_tm = gmtime_r (&add_time, &tm_buf);
      |                               ^~~~~~~~
lib/xfrm/ae.c:361:17: warning: implicit declaration of function 'strftime' [-Wimplicit-function-declaration]
  361 |                 strftime (flags, 128, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:138:1: note: include '<time.h>' or provide a declaration of 'strftime'
  137 | #include "nl-aux-xfrm/nl-xfrm.h"
  +++ |+#include <time.h>
  138 | 
lib/xfrm/ae.c:361:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  361 |                 strftime (flags, 128, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:361:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/ae.c:372:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  372 |                 strftime (buf, 128, "%Y-%m-%d %H-%M-%S", use_time_tm);
      |                 ^~~~~~~~
lib/xfrm/ae.c:372:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/ae.c:340:29: warning: unused variable 'tm_buf' [-Wunused-variable]
  340 |         struct tm           tm_buf;
      |                             ^~~~~~
make: *** [Makefile:5209: lib/xfrm/libnl_xfrm_3_la-ae.lo] Błąd 1
  CC       lib/xfrm/libnl_xfrm_3_la-sp.lo
lib/xfrm/sp.c: In function 'xfrm_sp_dump_line':
lib/xfrm/sp.c:362:29: error: storage size of 'tm_buf' isn't known
  362 |         struct tm           tm_buf;
      |                             ^~~~~~
lib/xfrm/sp.c:423:31: warning: implicit declaration of function 'gmtime_r' [-Wimplicit-function-declaration]
  423 |                 add_time_tm = gmtime_r (&add_time, &tm_buf);
      |                               ^~~~~~~~
lib/xfrm/sp.c:424:17: warning: implicit declaration of function 'strftime' [-Wimplicit-function-declaration]
  424 |                 strftime (dst, INET6_ADDRSTRLEN+5, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/sp.c:58:1: note: include '<time.h>' or provide a declaration of 'strftime'
   57 | #include "nl-aux-xfrm/nl-xfrm.h"
  +++ |+#include <time.h>
   58 | 
lib/xfrm/sp.c:424:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  424 |                 strftime (dst, INET6_ADDRSTRLEN+5, "%Y-%m-%d %H-%M-%S", add_time_tm);
      |                 ^~~~~~~~
lib/xfrm/sp.c:424:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/sp.c:435:17: warning: incompatible implicit declaration of built-in function 'strftime' [-Wbuiltin-declaration-mismatch]
  435 |                 strftime (src, INET6_ADDRSTRLEN+5, "%Y-%m-%d %H-%M-%S", use_time_tm);
      |                 ^~~~~~~~
lib/xfrm/sp.c:435:17: note: include '<time.h>' or provide a declaration of 'strftime'
lib/xfrm/sp.c:362:29: warning: unused variable 'tm_buf' [-Wunused-variable]
  362 |         struct tm           tm_buf;
      |                             ^~~~~~
make: *** [Makefile:5237: lib/xfrm/libnl_xfrm_3_la-sp.lo] Błąd 1
make: Obiekt 'all' nie został ponownie wykonany z powodu błędów.
Command exited with non-zero status 2

From config.log:

It was created by libnl configure 3.9.0, which was
generated by GNU Autoconf 2.71.  Invocation command line was
  $ ./configure --host=i686-buildroot-linux-uclibc --prefix=/usr --enable-silent-rules --disable-static --enable-shared --disable-debug --disable-pthreads --enable-cli=no

cross-compiling with i686-linux-gcc.br_real (Buildroot 2022.05-1002-g1500b7d5c8) 12.1.0, uClibc-ng-1.0.45

OlekMazur added a commit to OlekMazur/libnl that referenced this issue Jan 5, 2024
@thom311
Copy link
Owner

thom311 commented Jan 8, 2024

fixed by #371. Thank you.

@thom311 thom311 closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants