ports/textproc/sphinxsearch/files/patch-src_sphinxplugin.cpp
Matthew Seaman f074c54f02 Patches to make the code compatible with clang-6.0 / C++17 -- this will
fix the build on FreeBSD 12.0

   - delete the 'register' keyword everywhere
   - Add whitespace between adjacent quoted strings
   - Update the offsetof() macro to cast the result to int

Reported by:	pkg-fallout
2018-02-04 09:16:23 +00:00

11 lines
412 B
C++

--- src/sphinxplugin.cpp.orig 2016-07-19 10:42:18 UTC
+++ src/sphinxplugin.cpp
@@ -219,7 +219,7 @@ static bool PluginLoadSymbols ( void * pDesc, const Sy
#if !USE_WINDOWS
#define offsetof(T, M) \
- (reinterpret_cast<char*>(&(((T*)1000)->M)) - reinterpret_cast<char*>(1000))
+ ((int)(reinterpret_cast<char*>(&(((T*)1000)->M)) - reinterpret_cast<char*>(1000)))
#endif
static SymbolDesc_t g_dSymbolsUDF[] =