mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
6b75fe0638
Without the change build fails on toolchains like clang-13 which switch to -fno-common by default: $ nix build -L --impure --expr 'with import ./. {}; read-edid.override { stdenv = clang13Stdenv; }' ... read-edid> ld: CMakeFiles/get-edid.dir/classic.c.o:(.bss+0x0): multiple definition of `quiet'; CMakeFiles/get-edid.dir/get-edid.c.o:(.bss+0x0): first defined here read-edid> ld: CMakeFiles/get-edid.dir/i2c.c.o:(.bss+0x0): multiple definition of `quiet'; CMakeFiles/get-edid.dir/get-edid.c.o:(.bss+0x0): first defined here
23 lines
565 B
Diff
23 lines
565 B
Diff
--- a/get-edid/classic.c
|
|
+++ b/get-edid/classic.c
|
|
@@ -26,7 +26,7 @@ typedef byte* real_ptr;
|
|
#define dosmemput(buffer,length,offset) memcpy(offset,buffer,length)
|
|
|
|
#define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); }
|
|
-int quiet;
|
|
+extern int quiet;
|
|
|
|
real_ptr far_ptr_to_real_ptr( uint32 farptr )
|
|
{
|
|
--- a/get-edid/i2c.c
|
|
+++ b/get-edid/i2c.c
|
|
@@ -15,7 +15,7 @@
|
|
|
|
//Ideas (but not too much actual code) taken from i2c-tools. Thanks guys.
|
|
|
|
-int quiet;
|
|
+extern int quiet;
|
|
|
|
#define display(...) if (quiet == 0) { fprintf(stderr, __VA_ARGS__); }
|
|
|