History

Fix cross compiling on windows

herman ten brugge committed 1 year ago

Commit 8c3396a1 parent b45cea51 file · +5 −0Browse files

Unified · Split

tccelf.c+5−0
@@ -2804,7 +2804,9 @@ static void create_arm_attribute_section(TCCState *s1) · 2803 unmodified lines
28042804 #endif
28052805
28062806 #if TARGETOS_OpenBSD || TARGETOS_NetBSD || TARGETOS_FreeBSD
2807+#ifndef _WIN32
28072808 #include <sys/utsname.h>
2809+#endif
28082810
28092811 static void fill_bsd_note(Section *s, int type,
28102812 const char *value, uint32_t data)
@@ -2837,10 +2839,13 @@ static Section *create_bsd_note_section(TCCState *s1, · 26 unmodified lines
28372839 {
28382840 Section *s;
28392841 unsigned int major = 0, minor = 0, patch = 0;
2842+#ifndef _WIN32
28402843 struct utsname uts;
28412844
2845+/* Maybe move this to configure option for cross compiling */
28422846 if (!uname(&uts))
28432847 sscanf(uts.release, "%u.%u.%u", &major, &minor, &patch);
2848+#endif
28442849 #if TARGETOS_FreeBSD
28452850 if (major < 14)
28462851 return NULL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t