Skip to content
Snippets Groups Projects
Commit eab1684b authored by Jan Trávníček's avatar Jan Trávníček
Browse files

Merge branch 'fix-sys-types' into 'master'

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...

See merge request !23
parents a4c2f69b a623289d
No related branches found
No related tags found
Loading
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