<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
Thank you, Paul. I've checked the main branch and the issue with undeclared
<div class="elementToProof">variables is gone now.</div>
<div><br>
</div>
<div>I will also dare to mention another issue in this same thread, as it is kinda</div>
<div>part of the same story (us trying to build tz on older gcc / glibc / distro).</div>
<div>In our case, linker fails with:</div>
<div><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">    zic.o: In function `get_rand_u64':</span></div>
<div class="elementToProof"><span style="font-family: Consolas, Courier, monospace;">    zic.c:(.text+0x1978): undefined reference to `clock_gettime'</span></div>
<div class="elementToProof"><br>
</div>
<div>Usage of clock_gettime was introduced in the commit</div>
<div><br>
</div>
<div><span style="font-family: Consolas, Courier, monospace;">    commit 0733c65c14c424b5d9de5ee250a8bf2802a0b259</span></div>
<div><span style="font-family: Consolas, Courier, monospace;">    Author: Paul Eggert <eggert@cs.ucla.edu></span></div>
<div><span style="font-family: Consolas, Courier, monospace;">    Date:   Thu Oct 20 12:35:54 2022 -0700</span></div>
<div class="elementToProof"><span style="font-family: Consolas, Courier, monospace;">        Improve randomness of zic temp file names</span></div>
<div class="elementToProof"><br>
</div>
<div class="elementToProof">The problem is that our distro uses glibc-2.15. In these ancient times, to use</div>
<div>`clock_*` functions you had to link against `rt` library - but since version
</div>
<div>glibc-2.17 these functions are a part of standard C library. The problem can</div>
<div>be easily fixed from our side, just by adding a link flag to build command:</div>
<div class="elementToProof"><br>
</div>
<div class="elementToProof"><span style="font-family: Consolas, Courier, monospace;">    make LDFLAGS='-lrt' ...</span></div>
<div><br>
</div>
<div>Since even Centos 7 nowadays uses glibc-2.17, I doubt that one should tinker</div>
<div>with tz code to account for this case - but it might be worthy mentioning this</div>
somewhere in readme. Or not.
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Paul Eggert <eggert@cs.ucla.edu><br>
<b>Sent:</b> Saturday, October 29, 2022 00:53<br>
<b>To:</b> Иванов Игорь <i.ivanov@dssl.ru><br>
<b>Cc:</b> Time zone mailing list <tz@iana.org><br>
<b>Subject:</b> Re: [tz] zic.c - compilation broken on gcc 4.8.3 after commit e5b2ee634c7151484c06740ea2c8a4d4a75409b6</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2022-10-28 07:43, Иванов Игорь via tz wrote:<br>
<br>
> Apparently it breaks #if preprocessor logic in older compilers somewhere downstream - what was #if 1 becomes #if true, which GCC treats as "false" and falls into #else branch.<br>
<br>
Thanks for reporting the problem. I think the problem is in the <br>
HAS_INCLUDE macro, which now that I look at it more closely doesn't <br>
conform to C23 either. Although I doubt whether the problem is the <br>
true/false stuff I'll move those macros earlier just in case; that's <br>
more robust anyway.<br>
<br>
Please try the attached patch, which I installed into the development <br>
repository on GitHub.<br>
<br>
</div>
</span></font></div>
</body>
</html>