djvulibre: fix build with clang 16
This fixes the build with clang 16, which defaults to C++17. In C++17, the `register` storage class specifier was removed.
This commit is contained in:
parent
c516ad1ee1
commit
f0f53431d1
21
pkgs/applications/misc/djvulibre/c++17-register-class.patch
Normal file
21
pkgs/applications/misc/djvulibre/c++17-register-class.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -ur a/libdjvu/GBitmap.h b/libdjvu/GBitmap.h
|
||||
--- a/libdjvu/GBitmap.h 2020-11-20 09:57:32.000000000 -0700
|
||||
+++ b/libdjvu/GBitmap.h 2023-07-07 07:07:45.519912414 -0600
|
||||
@@ -620,7 +620,7 @@
|
||||
inline int
|
||||
GBitmap::read_run(unsigned char *&data)
|
||||
{
|
||||
- register int z=*data++;
|
||||
+ int z=*data++;
|
||||
return (z>=RUNOVERFLOWVALUE)?
|
||||
((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z;
|
||||
}
|
||||
@@ -628,7 +628,7 @@
|
||||
inline int
|
||||
GBitmap::read_run(const unsigned char *&data)
|
||||
{
|
||||
- register int z=*data++;
|
||||
+ int z=*data++;
|
||||
return (z>=RUNOVERFLOWVALUE)?
|
||||
((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z;
|
||||
}
|
@ -30,6 +30,10 @@ stdenv.mkDerivation rec {
|
||||
bash
|
||||
];
|
||||
|
||||
# Remove uses of the `register` storage class specifier, which was removed in C++17.
|
||||
# Fixes compilation with clang 16, which defaults to C++17.
|
||||
patches = [ ./c++17-register-class.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user