diff options
author | rakuco <rakuco@FreeBSD.org> | 2018-01-16 21:26:44 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2018-01-16 21:26:44 +0800 |
commit | 9052f5740bdec71f5c8550689f792c134eecb064 (patch) | |
tree | a6851a901a5000489e1da28d573c9564fef3f0c1 /graphics | |
parent | 8304419b00ffc51a401d10c41c4c680558a6cb83 (diff) | |
download | freebsd-ports-gnome-9052f5740bdec71f5c8550689f792c134eecb064.tar.gz freebsd-ports-gnome-9052f5740bdec71f5c8550689f792c134eecb064.tar.zst freebsd-ports-gnome-9052f5740bdec71f5c8550689f792c134eecb064.zip |
Fix the build with clang 6.0, which defaults to using -std=gnu++14.
/wrkdirs/usr/ports/graphics/digikam-kde4/work/digikam-4.14.0/core/libs/dimg/loaders/pgfloader.cpp:301:27: error: use of undeclared identifier 'NULL'
NULL,
^
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL nullptr
^
/usr/local/include/libpgf/PGFplatform.h:488:20: note: expanded from macro 'nullptr'
#define nullptr NULL
^
/wrkdirs/usr/ports/graphics/digikam-kde4/work/digikam-4.14.0/core/libs/dimg/loaders/pgfloader.cpp:461:26: error: use of undeclared identifier 'NULL'
NULL,
^
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL nullptr
^
/usr/local/include/libpgf/PGFplatform.h:488:20: note: expanded from macro 'nullptr'
#define nullptr NULL
^
PR: 224945
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/digikam-kde4/files/patch-libs_dimg_loaders_pgfloader.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/graphics/digikam-kde4/files/patch-libs_dimg_loaders_pgfloader.cpp b/graphics/digikam-kde4/files/patch-libs_dimg_loaders_pgfloader.cpp new file mode 100644 index 000000000000..be27b6ca8fb3 --- /dev/null +++ b/graphics/digikam-kde4/files/patch-libs_dimg_loaders_pgfloader.cpp @@ -0,0 +1,40 @@ +Fixes the build with clang 6.0, which defaults to -std=gnu++14: + + /wrkdirs/usr/ports/graphics/digikam-kde4/work/digikam-4.14.0/core/libs/dimg/loaders/pgfloader.cpp:301:27: error: use of undeclared identifier 'NULL' + NULL, + ^ + /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL' + #define NULL nullptr + ^ + /usr/local/include/libpgf/PGFplatform.h:488:20: note: expanded from macro 'nullptr' + #define nullptr NULL + ^ + /wrkdirs/usr/ports/graphics/digikam-kde4/work/digikam-4.14.0/core/libs/dimg/loaders/pgfloader.cpp:461:26: error: use of undeclared identifier 'NULL' + NULL, + ^ + /usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL' + #define NULL nullptr + ^ + /usr/local/include/libpgf/PGFplatform.h:488:20: note: expanded from macro 'nullptr' + #define nullptr NULL + ^ +--- libs/dimg/loaders/pgfloader.cpp.orig 2018-01-16 12:23:12 UTC ++++ libs/dimg/loaders/pgfloader.cpp +@@ -298,7 +298,7 @@ bool PGFLoader::load(const QString& filePath, DImgLoad + pgf.GetBitmap(m_sixteenBit ? width * 8 : width * 4, + (UINT8*)data, + m_sixteenBit ? 64 : 32, +- NULL, ++ nullptr, + CallbackForLibPGF, this); + + if (observer) +@@ -458,7 +458,7 @@ bool PGFLoader::save(const QString& filePath, DImgLoad + pgf.ImportBitmap(4 * imageWidth() * (imageSixteenBit() ? 2 : 1), + (UINT8*)imageData(), + imageBitsDepth() * 4, +- NULL, ++ nullptr, + CallbackForLibPGF, this); + + UINT32 nWrittenBytes = 0; |