Describe the bug
When I run 'bootstrap-vcpkg.sh' I get several warnings like this:
In file included from ../src/vcpkg/export.prefab.cpp:11:0:
../include/vcpkg/export.prefab.h:31:13: warning: In the GNU C Library, "minor" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "minor", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"minor", you should undefine it after including <sys/types.h>.
int minor() { return this->m_minor; }
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Bootstrap without warnings
Failure logs
A full session log
bootstrap.log
Additional context
If you need any more info, let me know. These are just warnings, so this is low priority. Just thought you should know and a quick search through your issues didn't reveal any existing ticket.
I get something similar on OpenSuseLeap 15.1 latest updates - see attached OpenSuseLeap.txt
Hi @teqdruid and @timautry
Thanks for posting this issue.
It should be introduced by this #10271.
@atkawa7
Could you please help look into this?
Thanks @NancyLi1013 @teqdruid @timautry . Let me look at this
@teqdruid @timautry @NancyLi1013 I current do not have an ubuntu vm to test on. What happens when you apply the following patch
diff --git a/toolsrc/include/vcpkg/export.prefab.h b/toolsrc/include/vcpkg/export.prefab.h
index 56a5ba371..84df036b5 100644
--- a/toolsrc/include/vcpkg/export.prefab.h
+++ b/toolsrc/include/vcpkg/export.prefab.h
@@ -7,6 +7,15 @@
#include <vector>
+
+#ifdef minor
+#undef minor
+#endif
+
+#ifdef major
+#undef major
+#endif
+
namespace vcpkg::Export::Prefab
{
constexpr int kFragmentSize = 3;
@atkawa7
Thanks for your so quick response and fix.
There are no these warning messages on my machine after adding the patch you provided above.
Thanks again for your help.
Hi @teqdruid
This has been fixed on latest version.
Could you please try to update vcpkg and rebuild this?
This should be fixed now. Pleas update vcpkg to the latest version and try to build it agian.
Please reopen this if it is still a problem for you.
Most helpful comment
@teqdruid @timautry @NancyLi1013 I current do not have an ubuntu vm to test on. What happens when you apply the following patch