Skip to content
Snippets Groups Projects
Commit a623289d authored by Jakub Jirůtka's avatar Jakub Jirůtka
Browse files

include <sys/types.h> where uint is used

Compilation fails on gcc 6.3.0 and musl libc:

  g++ -pipe -std=c++11 -O3 -DNDEBUG -DRELEASE -c -Wall -pedantic -Wextra -Werror \
    -Wshadow -Wpointer-arith -Wcast-qual -Wdelete-non-virtual-dtor \
    -Wredundant-decls -fPIC \
    ... \
    alib2algo_experimental/src/graph/spanningtree/Kruskal.cpp \
    -o alib2algo_experimental/obj-release/graph/spanningtree/Kruskal.o
  In file included from alib2algo_experimental/src/graph/spanningtree/Kruskal.cpp:15:0:
  alib2algo_experimental/src/graph/spanningtree/../datastructs/Components.h:74:3: error: 'uint' does not name a type
     uint parent;
     ^~~~

This type is defined in sys/types.h when _GNU_SOURCE or _BSD_SOURCE is
defined (at least in musl libc). Please note that uint is not specified
in C++ standard and should not be used...
parent a4c2f69b
No related branches found
No related tags found
1 merge request!23include <sys/types.h> where uint is used
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment