Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issue, implicit declaration of function major #4

Open
cratuki opened this issue Mar 6, 2020 · 0 comments
Open

Compile issue, implicit declaration of function major #4

cratuki opened this issue Mar 6, 2020 · 0 comments

Comments

@cratuki
Copy link

cratuki commented Mar 6, 2020

Hi Serge,

I am building on the latest Debian and working through some issues. I will raise issues as independent tickets, as you might not agree with all my solutions.

  1. Early in make, I get an error,

qga/commands-posix.c: In function ‘dev_major_minor’:
qga/commands-posix.c:633:21: error: implicit declaration of function ‘major’; did you mean ‘_m_por’? [-Werror=implicit-function-declaration]                                                                                                  
         *devmajor = major(st.st_rdev);
                     ^~~~~                                                                                                                                                                                                                    
                     _m_por  
qga/commands-posix.c:633:21: error: nested extern declaration of ‘major’ [-Werror=nested-externs]
qga/commands-posix.c:634:21: error: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Werror=implicit-function-declaration]
         *devminor = minor(st.st_rdev);
                     ^~~~~ 
                     mknod                                                                                                                                                                                                                    
qga/commands-posix.c:634:21: error: nested extern declaration of ‘minor’ [-Werror=nested-externs]
cc1: all warnings being treated as errors
make: *** [/home/cturner/opt/20200306.musicbox.cturner.ac.sergev.qemu.mips.pic32/qemu/rules.mak:57: qga/commands-posix.o] Error 1

This can be fixed by changing the import for sys/types.h to sys/sysmacros.h in the qga/commands-posix.c (source: hishamhm/htop#663)

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

No branches or pull requests

1 participant