mirror of https://github.com/F-Stack/f-stack.git
Ignore a compilation warning of drivers mlx5.
dlsym(if_indextoname) conversion of 'void *' pointer to function pointer type.
This commit is contained in:
parent
75ca4dc6e5
commit
a2cb0198e1
|
@ -1046,7 +1046,7 @@ mlx5_sysfs_check_switch_info(bool device_dir,
|
||||||
* @return
|
* @return
|
||||||
* 0 on success, a negative errno value otherwise and rte_errno is set.
|
* 0 on success, a negative errno value otherwise and rte_errno is set.
|
||||||
*/
|
*/
|
||||||
static int (*real_if_indextoname)(unsigned int, char *);
|
static char *(*real_if_indextoname)(unsigned int, char *) = NULL;
|
||||||
int
|
int
|
||||||
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
|
mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
|
||||||
{
|
{
|
||||||
|
@ -1069,7 +1069,7 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
|
||||||
|
|
||||||
// for ff tools
|
// for ff tools
|
||||||
if (!real_if_indextoname) {
|
if (!real_if_indextoname) {
|
||||||
real_if_indextoname = dlsym(RTLD_NEXT, "if_indextoname");
|
real_if_indextoname = __extension__ (char *(*)(unsigned int, char *))dlsym(RTLD_NEXT, "if_indextoname");
|
||||||
if (!real_if_indextoname) {
|
if (!real_if_indextoname) {
|
||||||
rte_errno = errno;
|
rte_errno = errno;
|
||||||
return -rte_errno;
|
return -rte_errno;
|
||||||
|
|
Loading…
Reference in New Issue