right? Which works even if these constants are defined elsewhere..
Still curious why you run into this. Current lirc is really built on quite a lot of platforms, so you have some kind of specific setup. That said, this is a bug which should be fixed.
Does the patch fix your problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cross-compile using a buildroot-2013.02 environment with uClibc. Yes, it's old, but i can't use a newer one in this particular case.
Looking at the headers, what works is
#define __USE_XOPEN
instead of
#define _XOPEN_SOURCE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, now i have it. You have to define _XOPEN_SOURCE at the very beginning before all other includes (the macros are defined via an include in lirc_log.h).
Which leads to the fact that lirc_log is included to early, I spotted that when looking into this. Maybe we should try a mor eproper fix. Does this patch make it? http://paste.fedoraproject.org/510015/14822324
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
lirc is built on a multitude of platforms. I want to make the impact of this as small as possible. The real truth about how this package builds are the Debian and Fedora build servers, not the fact that it builds for you and me...
Are you saying that including errno.h fails when _XOPEN_SOURCE is defined on your host? Could you please post the error message?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I think I have it. It's about feature_test_macros(7). According to this, the _XOPEN_SOURCE definition should precede all header inclusions, i. e., be at the very top.
.. or better
Or this patch:
right? Which works even if these constants are defined elsewhere..
Still curious why you run into this. Current lirc is really built on quite a lot of platforms, so you have some kind of specific setup. That said, this is a bug which should be fixed.
Does the patch fix your problem?
I cross-compile using a buildroot-2013.02 environment with uClibc. Yes, it's old, but i can't use a newer one in this particular case.
Looking at the headers, what works is
instead of
Odd. What does 'man poll' say on your host? My manpage does not mention __USE_XOPEN, just _XOPEN_SOURCE..
I assume you have actually tried"using _XOPEN_SOURCE?
Last edit: Alec Leamas 2016-12-20
Ok, now i have it. You have to define
_XOPEN_SOURCEat the very beginning before all other includes (the macros are defined via an include in lirc_log.h).OK, this seems to be about /usr/include/features.h. Substituting the _XOPEN_SOURCE line with
should fix it, right?
Which leads to the fact that lirc_log is included to early, I spotted that when looking into this. Maybe we should try a mor eproper fix. Does this patch make it?
http://paste.fedoraproject.org/510015/14822324
No, doesnt work. It's basically the same issue, the define must be before including lirc_log.h (actually before syslog.h).
Of, course, my bad. Sorry. This woirks then http://paste.fedoraproject.org/510051/3919114
Thiis is not my day... that link looks bad. Here, the same patch which I assume is OK?
I cant access this, "The contents of this paste have been hidden"
On 20/12/16 14:10, felix schmidt wrote:
ALready answered in bug...
--a
Sorry .. now it's errno.h (or something included from there) that triggers the error ..
Why not just put it to the top?
lirc is built on a multitude of platforms. I want to make the impact of this as small as possible. The real truth about how this package builds are the Debian and Fedora build servers, not the fact that it builds for you and me...
Are you saying that including errno.h fails when _XOPEN_SOURCE is defined on your host? Could you please post the error message?
If i put it this way it compiles fine:
Moving the define anywhere below the include of errno.h fails with the above error.
OK, I think I have it. It's about feature_test_macros(7). According to this, the _XOPEN_SOURCE definition should precede all header inclusions, i. e., be at the very top.
So, this should work: http://paste.fedoraproject.org/510097/82247508 Or?
EDIT: fix link.
Last edit: Alec Leamas 2016-12-20
Yep, thanks!
Fixed in [420505] (master) and [daa09c] (release-0_9_4). Thanks for reporting and testing!
Related
Commit: [420505]
Commit: [daa09c]