[botan-devel] Error During make (can't build Botan)

Brad Tilley brad at 16systems.com
Fri Dec 2 09:14:43 EST 2011


> This isn't TR1 related. The line that's failing was only ever tested (by
me at least) under Visual C++ as it's calling a Win32
> function. Apparently GCC is unhappy with converting a function pointer
to a void*, which is reasonable enough. I don't have MinGW installed but
the patch below should fix it.
>
> -Jack
>
> #
> # old_revision [ea68c910a808338888cf3f2bac71d592e9a056bb]
> #
> # patch "src/utils/dyn_load/dyn_load.cpp"
> #  from [38417a971c1cfb0f8453746700becbe353df00e4]
> #    to [27cde529ba93177424d7931b40f4d48aecef6944]
> #
> ============================================================
> --- src/utils/dyn_load/dyn_load.cpp
> 38417a971c1cfb0f8453746700becbe353df00e4
> +++ src/utils/dyn_load/dyn_load.cpp
> 27cde529ba93177424d7931b40f4d48aecef6944
> @@ -65,7 +65,8 @@ void* Dynamically_Loaded_Library::resolv
>  #if defined(BOTAN_TARGET_OS_HAS_DLOPEN)
>     addr = ::dlsym(lib, symbol.c_str());
>  #elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY)
> -   addr = ::GetProcAddress((HMODULE)lib, symbol.c_str());
> +   addr = reinterpret_cast<void*>(::GetProcAddress((HMODULE)lib, +
                                             symbol.c_str()));
>  #endif
>
>     if(!addr)

Thank you. I applied the patch. The reinterpret_cast fixed it. make gets
father along now, but fails here:

src\utils\time.cpp: In function 'tm Botan::<unnamed>::do_gmtime(time_t)':
src\utils\time.cpp:55:27: error: 'gmtime_s' was not declared in this scope
make: *** [build\lib\utils_time.obj] Error 1

Brad














More information about the botan-devel mailing list