Pavel Hrdina 1ba97d7f6b meson: tests: virmockstathelpers: replace check for _FILE_OFFSET_BITS
Meson always defines _FILE_OFFSET_BITS=64 which effectively makes
mocking of non 64-bit stat functions dead code.

On linux it was not an issue because we use the 64-bit versions but
on FreeBSD there are not 64-bit versions, there is only stat & lstat.

We cannot simply drop the check as that would resolve to compilation
error on 64-bit linux:

{standard input}: Assembler messages:
{standard input}:11468: Error: symbol `__xstat64' is already defined
{standard input}:11679: Error: symbol `__xstat64.cold' is already defined
{standard input}:12034: Error: symbol `__lxstat64' is already defined
{standard input}:12245: Error: symbol `__lxstat64.cold' is already defined

So we have to replace the _FILE_OFFSET_BITS with a check if the
corresponding 64-bit version of the stat function exists.

Replicate the meson behavior by always defining _FILE_OFFSET_BITS
instead of using AC_SYS_LARGEFILE otherwise this change would break
our tests.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:36 +02:00
..
2020-06-10 14:00:38 +02:00
2020-07-08 16:34:09 -04:00
2020-02-06 13:41:03 +01:00
2020-02-24 23:15:49 +01:00
2019-10-15 11:25:25 +02:00
2020-07-10 09:40:58 +02:00
2020-07-10 09:40:58 +02:00
2020-02-24 23:15:50 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-06-10 14:00:38 +02:00
2019-10-15 11:25:25 +02:00
2018-12-17 17:52:46 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-02-24 23:15:50 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-02-24 23:15:50 +01:00