Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Revert include path regression#7039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 1 commit intolibgit2:mainfromytnuf:stdint
Feb 26, 2025
Merged

Revert include path regression#7039

ethomson merged 1 commit intolibgit2:mainfromytnuf:stdint
Feb 26, 2025

Conversation

ytnuf
Copy link
Contributor

Problem

I've upgraded to using libgit2 v1.9, and I've been getting build errors that weren't there previously. This is caused by the custom<stdint.h> header file.

The build errors only occur when using ainstalled libgit2.
I am using Fedora Linux 41.

Example usage code

CMakeLists.txt

cmake_minimum_required(VERSION3.30)project(using_libgit2)add_executable(my_exemain.cpp)find_package(libgit2)target_link_libraries(my_exePRIVATElibgit2::libgit2package)

main.cpp

#include<cstdint>intmain() {return0;}

Trying to build this leads to errors like this:

/usr/include/c++/14/cstdint:51:11: error: ‘int8_t’ has not been declared in ‘::’   51 |   using ::int8_t;

Explanation

When using the installed libgit2 the include paths will now containinclude/git2 instead ofinclude. This is problematic because there's a custom<stdint.h> in thegit2 folder.
Now any user code that has#include <stdint.h>, will now include the custom<stdint.h> header instead of the standard one. Which causes the build error.

Solution

This PR fixes this regression.

@ytnufytnuf mentioned this pull requestFeb 13, 2025
7 tasks
@ethomsonethomson merged commiteb22b60 intolibgit2:mainFeb 26, 2025
19 checks passed
@ethomson
Copy link
Member

Thanks for the fix!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ytnuf@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp