From patchwork Wed Apr 27 14:55:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 615701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qw31307t0z9t73 for ; Thu, 28 Apr 2016 00:55:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=KIzv8t41; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=onwgIXcYCwi/TnmhpvSuFDmHcJlT4 +BJA4V/r7c72Nbi/mewtkPp8fwdksFtPidigJZCVxJ8IC4Ym3shd0DVHxFJVROkq eTCjmnGk+zdWBCEHhGwl5voreSKILsl8b8VLYAm2Vbz1I+dNSAk63KWOfkZh8Gbr n7jBpQBiSxEiaY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=+RxXcA35GxoQ6U+noDSWB3m/8DI=; b=KIz v8t41EujhQjqJnnivzZjFjloORHqcY6gU2tyWvvgAKebky7CmI5rH/h7dBFGh/mV hA1xpL4h8WU7tSk43Danjjf/XOWAR3yNoOoVeDn4f6Z1D15utICsBTA3ad4v13lf XXZUcKNQVKVzCeNkn2x+hXkV0UaJIh4RZYSNTilE= Received: (qmail 48359 invoked by alias); 27 Apr 2016 14:55:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 48346 invoked by uid 89); 27 Apr 2016 14:55:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:962, Member, 2016-04-27 X-HELO: mx1.redhat.com To: GNU C Library From: Florian Weimer Subject: [PATCH COMMITTED] nss_dns: Remove custom offsetof macro definition Message-ID: <5720D2DA.3010304@redhat.com> Date: Wed, 27 Apr 2016 16:55:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Added #include to be on the safe side regarding availability of offsetof. Florian 2016-04-27 Florian Weimer * resolv/nss_dns/dns-network.c (offsetof): Remove macro definition. Include instead. diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c index 8f301a7..99ec755 100644 --- a/resolv/nss_dns/dns-network.c +++ b/resolv/nss_dns/dns-network.c @@ -62,6 +62,7 @@ #include #include #include +#include #include "nsswitch.h" #include @@ -234,9 +235,6 @@ _nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result, } -#undef offsetof -#define offsetof(Type, Member) ((size_t) &((Type *) NULL)->Member) - static enum nss_status getanswer_r (const querybuf *answer, int anslen, struct netent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop,