Skip to content

Conversation

pkubaj
Copy link
Contributor

@pkubaj pkubaj commented Apr 25, 2022

ARM and POWER are affected.

@stappersg
Copy link
Contributor

(Summary: the proposed patch did get human attention)

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c as libc::c_char;

It is the libc:: that makes me wonder if that will block using libpnet in a no_std environment.

Would like to known if

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c as c_char;

or even

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c;

will compile (will work) on ARM and/of POWERPC.

(Feel free to render this comment as just noise.)

@pkubaj
Copy link
Contributor Author

pkubaj commented Apr 25, 2022

(Summary: the proposed patch did get human attention)

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c as libc::c_char;

It is the libc:: that makes me wonder if that will block using libpnet in a no_std environment.

Would like to known if

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c as c_char;

error[E0412]: cannot find type c_char in this scope

or even

-        iface.ifr_name[i] = c as i8;
+        iface.ifr_name[i] = c;

That indeed seems to work.

will compile (will work) on ARM and/of POWERPC.

(Feel free to render this comment as just noise.)

@infosechoudini
Copy link

can we push a new commit that doesnt have c_char?

@infosechoudini
Copy link

in the future, we'll look into other methods of building cross-os and cross-arch

@mrmonday mrmonday merged commit ce67226 into libpnet:master Apr 25, 2022
@mrmonday
Copy link
Contributor

Looks good thanks!

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.

4 participants