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

not able to compile it with the g++ command in the comment #1792

Open
wangyihanlarry opened this issue Jul 25, 2024 · 2 comments
Open

not able to compile it with the g++ command in the comment #1792

wangyihanlarry opened this issue Jul 25, 2024 · 2 comments

Comments

@wangyihanlarry
Copy link

wangyihanlarry commented Jul 25, 2024

* g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c \

hi I'm not able to complile the null.c with the command, could u please doube check the code

g++ -O2 -g -shared -rdynamic -fPIC -o cpp_null null.c -include ../config-host.h -DFIO_EXTERNAL_ENGINE
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
null.c:110:7: error: assigning to 'struct null_data *' from incompatible type 'void *'
nd = malloc(sizeof(*nd));
^~~~~~~~~~~~~~~~~~~
null.c:115:15: error: assigning to 'struct io_u **' from incompatible type 'void *'
nd->io_us = calloc(td->o.iodepth, sizeof(struct io_u *));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

@wangyihanlarry
Copy link
Author

alson I am not able to find config-host.h

@axboe
Copy link
Owner

axboe commented Jul 25, 2024

Probably needs updating due to anal casting checks on newer c++.

alson I am not able to find config-host.h

It's generated by configure

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

2 participants