Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gnome-keyring
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 94
    • Issues 94
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gnome-keyring
  • Merge requests
  • !48

Fix implicit declaration of utimes and gettimeofday.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ryan Schmidt requested to merge ryandesign/gnome-keyring:ryandesign-master-patch-27503 into master Mar 24, 2022
  • Overview 2
  • Commits 1
  • Pipelines 3
  • Changes 1

gnome-keyring 3.36.0 doesn't build (on macOS 10.15.7 with Xcode 12.4):

pkcs11/xdg-store/mock-xdg-module.c:91:2: error: implicit declaration of function 'gettimeofday' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        gettimeofday (tv, NULL);
        ^
pkcs11/xdg-store/mock-xdg-module.c:95:6: error: implicit declaration of function 'utimes' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if (utimes (filename, tv) < 0)
            ^
pkcs11/xdg-store/mock-xdg-module.c:95:6: note: did you mean 'times'?
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/times.h:90:9: note: 'times' declared here
clock_t times(struct tms *);
        ^
2 errors generated.

This was reported to MacPorts here: https://trac.macports.org/ticket/64880

Although I realize newer versions of gnome-keyring are available and I have not tested them, this source code file doesn't look like it has been touched in 8 years so I don't believe you've fixed the problem yet. This PR fixes the problem for me on macOS.

It seems like there was just a typo where sys/times.h should have been sys/time.h so that's what I changed. It's possible that on systems other than mine something this file uses is actually declared in sys/times.h and that both headers should be there.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ryandesign-master-patch-27503