settimeofday hidden
settimeofday hidden
Declaration of settimeofday() seems to be hidden behind #ifdef __BSD_VISIBLE (which I don't believe is defined). Is there a reason for this? I had to move the declaration out of that #ifdef for it to work.
Re: settimeofday hidden
I can't reproduce this... __BSD_VISIBLE is set when compiling main.c from the template application and including <sys/time.h>.
Please check if you happen to have _ANSI_SOURCE, _C99_SOURCE, _C11_SOURCE defined in your translation unit for some reason. If you don't have any of these, then you should get __BSD_VISIBLE and settimeofday as a result.
Please check if you happen to have _ANSI_SOURCE, _C99_SOURCE, _C11_SOURCE defined in your translation unit for some reason. If you don't have any of these, then you should get __BSD_VISIBLE and settimeofday as a result.
Re: settimeofday hidden
This issue was that <sys/cdefs.h> is not included in sys/time.h so if <sys/time.h> is included before anything else that includes cdefs.h, __BDS_VISIBLE never gets defined. After adding #include <sys/cdefs.h> before #include <sys/time.h>, the problem was fixed.
Thanks.
Thanks.
Who is online
Users browsing this forum: No registered users and 188 guests