Skip to content

Commit

Permalink
third_party: Update resolv_wrapper to version 1.1.8
Browse files Browse the repository at this point in the history
res_randomid() is marked as deprecated in newer glibc.

Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Wed Dec 21 21:28:42 UTC 2022 on sn-devel-184
  • Loading branch information
cryptomilk authored and jrasamba committed Dec 21, 2022
1 parent 6ec2488 commit 429bf5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion buildtools/wafsamba/samba_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def CHECK_NSS_WRAPPER(conf):

@conf
def CHECK_RESOLV_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.7')
return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.8')
Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER

@conf
Expand Down
4 changes: 3 additions & 1 deletion third_party/resolv_wrapper/resolv_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ static int rwrap_create_fake_ptr_rr(const char *key,
return 0;
}

#define rwrap_randomid() 0xffff & getpid()

/* Prepares a fake header with a single response. Advances header_blob */
static ssize_t rwrap_fake_header(uint8_t **header_blob, size_t remaining,
size_t ancount, size_t arcount)
Expand All @@ -451,7 +453,7 @@ static ssize_t rwrap_fake_header(uint8_t **header_blob, size_t remaining,
h.blob = *header_blob;
memset(h.blob, 0, NS_HFIXEDSZ);

h.header->id = res_randomid(); /* random query ID */
h.header->id = rwrap_randomid(); /* random query ID */
h.header->qr = 1; /* response flag */
h.header->rd = 1; /* recursion desired */
h.header->ra = 1; /* recursion available */
Expand Down
2 changes: 1 addition & 1 deletion third_party/resolv_wrapper/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from waflib import Logs

VERSION="1.1.7"
VERSION="1.1.8"

def configure(conf):
if conf.CHECK_RESOLV_WRAPPER():
Expand Down

0 comments on commit 429bf5c

Please sign in to comment.