From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11864 Path: news.gmane.org!.POSTED!not-for-mail From: Jorge Almeida Newsgroups: gmane.linux.lib.musl.general Subject: RTC_RD_TIME Date: Tue, 29 Aug 2017 22:28:14 +0100 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1504042140 23705 195.159.176.226 (29 Aug 2017 21:29:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Aug 2017 21:29:00 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11877-gllmg-musl=m.gmane.org@lists.openwall.com Tue Aug 29 23:28:50 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dmo3v-0005GN-3N for gllmg-musl@m.gmane.org; Tue, 29 Aug 2017 23:28:43 +0200 Original-Received: (qmail 3948 invoked by uid 550); 29 Aug 2017 21:28:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3913 invoked from network); 29 Aug 2017 21:28:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Q5CLuglbJhSfBokVlxY4uN2nRA0mytYW+9elryQWHbc=; b=T/APo/dfzT5inGTHywhWKc0k45UW2sX9+ZHQdOzx7UqOwW+GpB2k3AIkh0HE7SurcV qrvQj6gXdGjmLB7nqc9/jAZOS2N/U3Uhc0QFD3UyxMUrelpewuSrGVa/QvCP7fyLBgmO z43V5J95V7zTnERe+xZPYyG5+KhK5ACAPNh9VZo1+hAisFVy0qEfEWSHkfnd/gH4NC8O vopZUg6L1ZqPDrugE7YIy+gQo5jWndNih1w3DNBXnUJiDdgGRjhy4+AgNbBmaCx79PXU LUxpF0eiY7Za9LPMdRkUu+bwt8I2+WdwJQBjxO67h6sZ/cznZ6ezVru5EiE26y8eixKx PGbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Q5CLuglbJhSfBokVlxY4uN2nRA0mytYW+9elryQWHbc=; b=Tl0Lc7cqzPbYVJcfjoO06I2Vb69Cdhbnw+WZ5tKxAijKrDoIIyYcSHdk+lUuqGpc8Z wVvwY9K5IyCmWKMyNEw0UVmfnXANKN2YihsYSSQ3VwGBrlspyXXRgCmL4A8aQTsRCcua JiPCvn+aQWsLQyv7UWD8tJ3OsBRTAH1SRoLhshClD8nm7uPNLCJlCXmZgZ3gFII005uk DdT5h6TxNPIGjCwy/Qf4FnJmIo7C96htcj3U+pXs0wMRNGJnzBbYuO4yhe5iRvE95AyC 0gJYbFV4HCOMP/qVCDYnnNewCB2Xr+T1MJwPqGckpc8u0mNyECo40Ure579V6IbXVt+/ EFoA== X-Gm-Message-State: AHYfb5gQlSpNbo/WjaHldAV4H0FTI+mlw/r8DaNIsvU3mH/F94SW7uY8 rl4T5AdOtLiVPpy3tBN8RTouNkTF8+2M X-Received: by 10.107.181.212 with SMTP id e203mr5080577iof.53.1504042114725; Tue, 29 Aug 2017 14:28:34 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:11864 Archived-At: A function to read the hardware clock (the battery powered thingy in the motherboard): (man 4 rtc) void read_hw(struct rtc_time* rtctime){ int rtcfd=open("/dev/rtc0" , O_RDONLY); ioctl(rtcfd, RTC_RD_TIME, rtctime); close(rtcfd); } (error checking omitted) The problem: warning: overflow in implicit constant conversion [-Woverflow] (an arrow pointing to RTC_RD_TIME) The same program compiles without warnings with glibc and dietlibc. Headers: #define _DEFAULT_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include TIA Jorge Almeida