]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: Fix endian check for cross build
authorDaniel Wagner <dwagner@suse.de>
Fri, 28 Oct 2022 09:32:30 +0000 (11:32 +0200)
committerDaniel Wagner <dwagner@suse.de>
Fri, 28 Oct 2022 09:34:27 +0000 (11:34 +0200)
The endian check is supposed to figure it the ordering on the machine
which the binary will run on. Hence we need to check the host not the
build machine.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
meson.build

index 03bd6b7f0caa87f673ff8560c60b611e94092146..52128d9f6351ea607f5258277f852fb47e283eb5 100644 (file)
@@ -124,12 +124,12 @@ conf.set10(
 )
 conf.set10(
     'HAVE_LITTLE_ENDIAN',
-    build_machine.endian() == 'little',
+    host_machine.endian() == 'little',
     description: 'Building for little-endian'
 )
 conf.set10(
     'HAVE_BIG_ENDIAN',
-    build_machine.endian() == 'big',
+    host_machine.endian() == 'big',
     description: 'Building for big-endian'
 )
 conf.set10(