Skip to content

fixed undefined reference to `makedev'#5

Open
yasintuncel wants to merge 1 commit intoRtone:masterfrom
yasintuncel:issue-makedev
Open

fixed undefined reference to `makedev'#5
yasintuncel wants to merge 1 commit intoRtone:masterfrom
yasintuncel:issue-makedev

Conversation

@yasintuncel
Copy link

add #include <sys/sysmacros.h> library to cmux.c for using makedev function

otherwise the code give below error

make: Warning: File 'cmux.c' has modification time 9.8 s in the future
gcc -Wall    cmux.c   -o cmux
cmux.c: In function ‘make_nodes’:
cmux.c:232:12: warning: implicit declaration of function ‘makedev’; did you mean ‘make_nodes’? [-Wimplicit-function-declaration]
  232 |   device = makedev(major, minor);
      |            ^~~~~~~
      |            make_nodes
/usr/bin/ld: /tmp/cctCHk58.o: in function `make_nodes':
cmux.c:(.text+0x3bc): undefined reference to `makedev'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: cmux] Error 1

add #include <sys/sysmacros.h> library for using makedev function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments