NetBSD Problem Report #59104

From www@netbsd.org  Tue Feb 25 16:41:01 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F2DD21A923A
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Feb 2025 16:41:00 +0000 (UTC)
Message-Id: <20250225164059.D0C2F1A923D@mollari.NetBSD.org>
Date: Tue, 25 Feb 2025 16:40:59 +0000 (UTC)
From: netbsd@singularity.org.uk
Reply-To: netbsd@singularity.org.uk
To: gnats-bugs@NetBSD.org
Subject: pkgsrc wine-9.0 cannot find DLLs
X-Send-Pr-Version: www-1.0

>Number:         59104
>Category:       pkg
>Synopsis:       pkgsrc wine-9.0 cannot find DLLs
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 25 16:45:00 +0000 2025
>Originator:     Graham Willmott
>Release:        pkgsrc current 2025-02-01
>Organization:
>Environment:
NetBSD arc.singularity.org.uk 10.99.12 NetBSD 10.99.12 (ARC) #0: Thu Dec 12 13:35:57 GMT 2024  graham@arc.singularity.org.uk:/home/graham/sysbuild/amd64/obj/usr/src/sys/arch/amd64/compile/ARC amd64
>Description:
Wine 9.0 builds OK but does not run any Windows applications other than the simple internal programs like notepad and winecfg. Programs requiring DLLs to be loaded fail with a "DLL not found" error in the Wine debug output.

This is caused by Wine incorrectly believing the filesystem is case-insensitive and therefore not performing the correct filename translation when searching for DLLs.

The root cause is that the strncmp call used to check the filesystem type in ntdll/unix/file.c uses the wrong logic.
>How-To-Repeat:
wine64 <almost-any-program>.exe
>Fix:

--- dlls/ntdll/unix/file.c.orig	2024-01-16 20:55:47.000000000 +0000
+++ dlls/ntdll/unix/file.c
@@ -1238,8 +1238,8 @@ static BOOLEAN get_dir_case_sensitivity_

     if (statvfs( dir, &stfs ) == -1) return TRUE;
     /* Only assume CIOPFS is case insensitive. */
-    if (strcmp( stfs.f_fstypename, "fusefs" ) ||
-        strncmp( stfs.f_mntfromname, "ciopfs", 5 ))
+    if (!strcmp( stfs.f_fstypename, "fusefs" ) &&
+        !strncmp( stfs.f_mntfromname, "ciopfs", 5 ))
         return FALSE;
     return TRUE;

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.