Bug 105517

Summary: Fails to build on x86_64-w64-mingw32 because of missing pwd.h
Product: p11-glue Reporter: Hiroshi Hatake <cosmo0920.oucc>
Component: p11-kitAssignee: Stef Walter <stefw>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: cosmo0920.oucc
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to handle missing pwd.h on mingw32.
Patch to handle missing pwd.h on mingw32.
Patch to handle missing pwd.h on mingw32.
Patch to handle missing pwd.h on mingw32 v4.

Description Hiroshi Hatake 2018-03-15 08:36:31 UTC
Created attachment 138122 [details] [review]
Patch to handle missing pwd.h on mingw32.

pwd.h is not provided in mingw32 enrionment.
This bug applies to current git e8d569045c7d224e94836edd77856823aadf8267
as well as to current release 0.22.10.
    
The build fails because of:
common/runtime.c:40:17: fatal error: pwd.h: No such file or directory
 #include <pwd.h>
                ^
 compilation terminated.
 Makefile:3123: recipe for target 'common/runtime.lo' failed
 make[2]: *** [common/runtime.lo] Error 1
    
mingw32 environment does not get_uid() and its related Unix password
database functionalityi to obtain user specific runtime directory.
This functionality is possibly to be replaced with SHGetFolderPath WIN32API.
Comment 1 Hiroshi Hatake 2018-03-15 08:37:57 UTC
Created attachment 138123 [details] [review]
Patch to handle missing pwd.h on mingw32.
Comment 2 Hiroshi Hatake 2018-03-15 08:57:09 UTC
Created attachment 138124 [details] [review]
Patch to handle missing pwd.h on mingw32.
Comment 3 Hiroshi Hatake 2018-03-15 09:00:14 UTC
Created attachment 138125 [details] [review]
Patch to handle missing pwd.h on mingw32 v4.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.