diff options
Diffstat (limited to 'tools/hv')
-rw-r--r-- | tools/hv/hv_kvp_daemon.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 908a612ac992..704a0f9a063d 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c | |||
@@ -102,6 +102,10 @@ static struct utsname uts_buf; | |||
102 | #define MAX_FILE_NAME 100 | 102 | #define MAX_FILE_NAME 100 |
103 | #define ENTRIES_PER_BLOCK 50 | 103 | #define ENTRIES_PER_BLOCK 50 |
104 | 104 | ||
105 | #ifndef SOL_NETLINK | ||
106 | #define SOL_NETLINK 270 | ||
107 | #endif | ||
108 | |||
105 | struct kvp_record { | 109 | struct kvp_record { |
106 | char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; | 110 | char key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; |
107 | char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; | 111 | char value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; |
@@ -1407,7 +1411,7 @@ netlink_send(int fd, struct cn_msg *msg) | |||
1407 | 1411 | ||
1408 | int main(void) | 1412 | int main(void) |
1409 | { | 1413 | { |
1410 | int fd, len, sock_opt; | 1414 | int fd, len, nl_group; |
1411 | int error; | 1415 | int error; |
1412 | struct cn_msg *message; | 1416 | struct cn_msg *message; |
1413 | struct pollfd pfd; | 1417 | struct pollfd pfd; |
@@ -1452,8 +1456,8 @@ int main(void) | |||
1452 | close(fd); | 1456 | close(fd); |
1453 | exit(EXIT_FAILURE); | 1457 | exit(EXIT_FAILURE); |
1454 | } | 1458 | } |
1455 | sock_opt = CN_KVP_IDX; | 1459 | nl_group = CN_KVP_IDX; |
1456 | setsockopt(fd, 270, 1, &sock_opt, sizeof(sock_opt)); | 1460 | setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &nl_group, sizeof(nl_group)); |
1457 | /* | 1461 | /* |
1458 | * Register ourselves with the kernel. | 1462 | * Register ourselves with the kernel. |
1459 | */ | 1463 | */ |