client/ups: add missing include#331
client/ups: add missing include#331clepple merged 1 commit intonetworkupstools:masterfrom yann-morin-1998:yem/musl-fix
Conversation
struct timeval is declared in sys/time.h, so we need to #include it. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
I agree that In the long term, we should be more formal about requiring a certain minimum set of POSIX features to build, so things like |
|
Never mind, I see that |
|
@clepple Thanks for merging! However, I am not sure I understood that sentence of yours:
My build issue was while cross-compiling, so even if my hpst machine had But, since you merged that, I guess all is good. Thanks! :-) |
Ah, I assumed the build error was from including |
|
@clepple OK, thanks for the explanations. |
|
I had issues compiling that expectation at least on some systems, e.g. |
|
@jimklimov In debian, the system include path is in And on a freshly installed Jessie as of today, it works for me: So there seems to be some kind of misconfiguration on your side. Can you |
|
Interesting... unfortunately, I did not have reproduction notes to the issue - even though I haven't hit it in the years before. It is possible that something blew up while I was trying to set up experimental cross-compilation and explicitly listed the Also, one matter is living on systems that follow the "current POSIX recommendation" and another is supporting those systems which do not (e.g. old releases) that can be easily supported otherwise. |
|
So, a few things... First, don't point Second, for cross-compilation, the cross-compiler already knows where to look for its own system headers, no need to tell it where they are. Any decently recent cross-compler is sysrooted nowadays, and it means it can be relocated without issue. a non-sysrooted cross-compiler is so old that it is at least a decade old now, if not more. I highly doubt current nut would even build on such an ancient cross-compiler (gcc 4.2 was already fully sysrooted, and that was released more than 10 years ago now...) (Sorry, no pointer, just my long experience doing cross-toolchain...) Third, |
|
I feel puzzled now :) And so much the worse that I can't really detail how I stumbled on this. I think the story went like this: in our project we used Linaro GCC + toolkit for some parts like firmware. Given that native ARM compilations are slow, I looked at how much of our project's pieces can be built by cross-compiling, and started out with Linaro as known to work for us elsewhere. Maybe I should have used some native Debian GCC package for cross-compiling? We had some poor experience with those about 3 years ago, so did not look again since :\ I believe one of the bigger issues that led me to So one way or another, during that journey I stumbled on If 8de8b8e was wrong to remove it, there may be a point in just copy-pasting the |
struct timeval is declared in sys/time.h, so we need to #include it.
Signed-off-by: "Yann E. MORIN" yann.morin.1998@free.fr