|
From: Mij <mi...@ss...> - 2010-04-01 15:37:45
|
On Apr 1, 2010, at 11:18 , Johan Bergström wrote:
> Hey,
>
> On 31 mar 2010, at 17.10, Mij wrote:
>
>> Hi Johan,
>>
>> Since that function's signature is sane, and that error doesn't occur in other versions
>> of gcc, I infer that is a compiler snap.
>>
>> If you can't change compiler (as I guess, on your hardware), you can try to:
>
> Regarding my setup: Flashrd/flashdist is bascially stock OpenBSD 4.6 but helps you with sticking with a read only system. I can of course add an additional compiler trough ports if needed.
you're probably better off compiling from another box then
> What compiler does sshguard recoment for OpenBSD? Perhaps this should be added as a configure check?
>
> Afaik, GCC 2.95 and 3.3.5 are shipped with OpenBSD 4.6. OpenBSD 4.7 (soon released) also seems to ship these - which should imply that sshguard 1.5 won't run on OpenBSD.
I usually keep myself from telling people what compiler to choose; especially under
BSD, where it's so tied to the system, and especially in OpenBSD, where GCC is
usually significantly patched/extended.
What I can say is that 4.x had vast (binary) performance boosts, and much better C99
support.
>> 1) change the definition on that line in sshguard_fw.h (88) and command.c (62) with
>>
>> int fw_block_list(const char (*restrict addresses)[], int addrkind, const int service_codes[]) {
>> or
>> int fw_block_list(const char *restrict *addresses, int addrkind, const int service_codes[]) {
>>
>> 2) remove the "restrict" qualifier from the same locations, and recompile the entire package
>> (ie, make clean all)
>
> I tried both of these alternatives as well as some dwelling into both but no luck. I don't think the code as is will work with OpenBSD's current compilers.
it can't be that 2) doesn't work :)
To go the radical, you can add
"-Drestrict="
(nothing after =) to gcc's cflags.
I will consider whether to remove the restrict qualifier for future versions. I'm adverse
to patch code up to compiler quirks, but for "restrict" one can be malleable.
|