diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/video/mjpegtools/c++-17-fixes.patch | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/video/mjpegtools/c++-17-fixes.patch')
-rw-r--r-- | pkgs/tools/video/mjpegtools/c++-17-fixes.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/tools/video/mjpegtools/c++-17-fixes.patch b/pkgs/tools/video/mjpegtools/c++-17-fixes.patch new file mode 100644 index 00000000000..018cc7e9bea --- /dev/null +++ b/pkgs/tools/video/mjpegtools/c++-17-fixes.patch @@ -0,0 +1,44 @@ +diff -ur a/mplex/main.cpp b/mplex/main.cpp +--- a/mplex/main.cpp 2021-09-05 02:14:13.029372000 -0400 ++++ b/mplex/main.cpp 2023-09-23 08:47:07.683450627 -0400 +@@ -50,7 +50,7 @@ + #include "multiplexor.hpp" + + +-using std::auto_ptr; ++using std::unique_ptr; + + + /************************************************************************* +@@ -138,7 +138,7 @@ + void + FileOutputStream::NextSegment( ) + { +- auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] ); ++ unique_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] ); + char *prev_filename = prev_filename_buf.get(); + fclose(strm); + ++segment_num; +diff -ur a/utils/fastintfns.h b/utils/fastintfns.h +--- a/utils/fastintfns.h 2021-09-05 02:14:13.033372000 -0400 ++++ b/utils/fastintfns.h 2023-09-23 08:44:40.147112973 -0400 +@@ -2,12 +2,17 @@ + * + * WARNING: Assumes 2's complement arithmetic. + */ +-static inline int intmax( register int x, register int y ) ++#ifdef __cplusplus ++#define REGISTER ++#else ++#define REGISTER register ++#endif ++static inline int intmax( REGISTER int x, REGISTER int y ) + { + return x < y ? y : x; + } + +-static inline int intmin( register int x, register int y ) ++static inline int intmin( REGISTER int x, REGISTER int y ) + { + return x < y ? x : y; + } |