Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: build failure using mingw #25276

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions recipes/libelf/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ sources:
"https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz",
]
sha256: "591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d"

patches:
"0.8.13":
- patch_file: "patches/0001-getenv-fix.diff"
base_path: "source_subfolder"
2 changes: 1 addition & 1 deletion recipes/libelf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate(self):
tc.generate()

def build(self):
if self.settings.os == "Windows":
if self.settings.os == "Windows":
cmake = CMake(self)
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir))
cmake.build()
Expand Down
21 changes: 21 additions & 0 deletions recipes/libelf/all/patches/0001-getenv-fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Subject: [PATCH] fix: Add #include <stdlib.h>

---
version.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/version.c b/version.c
index 7a901d3..8dc1920 100644
--- a/version.c
+++ b/version.c
@@ -18,6 +18,7 @@
*/

#include <private.h>
+#include <stdlib.h>

#ifndef lint
static const char rcsid[] = "@(#) $Id: version.c,v 1.8 2008/05/23 08:15:35 michael Exp $";
--
2.43.0