[PATCH] ntdll: Make LdrUnloadDLL() a stub for musl libc.

Alexandre Julliard julliard at winehq.org
Wed Nov 16 16:51:21 CST 2016


He X <xw897002528 at gmail.com> writes:

> @@ -2898,6 +2898,7 @@ static void MODULE_DecRefCount( WINE_MODREF *wm )
>   */
>  NTSTATUS WINAPI LdrUnloadDll( HMODULE hModule )
>  {
> +#ifndef UNLOAD_AFTER_DLCLOSE
>      WINE_MODREF *wm;
>      NTSTATUS retv = STATUS_SUCCESS;
>  
> @@ -2932,6 +2933,10 @@ NTSTATUS WINAPI LdrUnloadDll( HMODULE hModule )
>      RtlLeaveCriticalSection( &loader_section );
>  
>      return retv;
> +#else
> +    TRACE("stab for musl\n");
> +    return STATUS_SUCCESS;
> +#endif

You can't do that, unloading dlls is necessary in many cases. The
corresponding .so not being unloaded could probably be detected by using
destructors, though fixing musl may be preferable.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list