From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 95C37385841B for ; Fri, 11 Feb 2022 19:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95C37385841B Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21BHiuUT012746; Fri, 11 Feb 2022 19:18:30 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e50hjp3fy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Feb 2022 19:18:29 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21BJIJUt007440; Fri, 11 Feb 2022 19:18:29 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma03dal.us.ibm.com with ESMTP id 3e1gvdhwsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Feb 2022 19:18:29 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21BJIR4A32571832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Feb 2022 19:18:27 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9057611207E; Fri, 11 Feb 2022 19:18:27 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1FFB0112067; Fri, 11 Feb 2022 19:18:27 +0000 (GMT) Received: from linux.ibm.com (unknown [9.65.237.250]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 11 Feb 2022 19:18:26 +0000 (GMT) From: Tulio Magno Quites Machado Filho To: libc-alpha@sourceware.org Subject: [PATCH] Fix building tst-socket-timestamp-compat on older Linux Date: Fri, 11 Feb 2022 16:16:38 -0300 Message-Id: <20220211191638.324672-1-tuliom@linux.ibm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ha7WaKOovTtEm4PXQJyf-d_b7Tj76Ccx X-Proofpoint-ORIG-GUID: ha7WaKOovTtEm4PXQJyf-d_b7Tj76Ccx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-11_05,2022-02-11_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 clxscore=1011 phishscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202110102 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2022 19:18:31 -0000 Work around an error caused by not having SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW, SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD defined. Tested on ppc64le and x86_64 using Linux 4.16 and 4.18. --- .../sysv/linux/tst-socket-timestamp-compat.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c index 0ff1a214e6..68b0a0e412 100644 --- a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c +++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c @@ -23,6 +23,23 @@ #include #include +/* The following macros are only available on ABIs that support 32 bit time_t. + This test has a runtime check to guarantee it runs only on these ABIs. + However, we need to create fake values to guarantee this test is built + for all the ABIs. */ +#ifndef SO_TIMESTAMP_NEW +# define SO_TIMESTAMP_NEW 0 +#endif +#ifndef SO_TIMESTAMPNS_NEW +# define SO_TIMESTAMPNS_NEW 0 +#endif +#ifndef SO_TIMESTAMP_OLD +# define SO_TIMESTAMP_OLD 0 +#endif +#ifndef SO_TIMESTAMPNS_OLD +# define SO_TIMESTAMPNS_OLD 0 +#endif + /* AF_INET socket and address used to receive data. */ static int srv; static struct sockaddr_in srv_addr; -- 2.34.1