<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:21:36 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CDRIVER-4674] Pointless code in bson-clock.c</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-4674</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;These lines in bson-clock.c are pointless and can be removed:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/9e7bf882d1fb4e16f5701a152f5c664088ffcda3/src/libbson/src/bson/bson-clock.c#L128-L130&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/blob/9e7bf882d1fb4e16f5701a152f5c664088ffcda3/src/libbson/src/bson/bson-clock.c#L128-L130&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code essentially says if &lt;tt&gt;clock_gettime&lt;/tt&gt; and &lt;tt&gt;CLOCK_MONOTONIC&lt;/tt&gt; are defined, use them, otherwise if we&apos;re on macOS, use &lt;tt&gt;clock_gettime_nsec_np&lt;/tt&gt; and &lt;tt&gt;CLOCK_UPTIME_RAW&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This makes no sense since &lt;tt&gt;clock_gettime&lt;/tt&gt; and &lt;tt&gt;CLOCK_MONOTONIC&lt;/tt&gt; were introduced in OS X 10.11 and &lt;tt&gt;clock_gettime_nsec_np&lt;/tt&gt; and &lt;tt&gt;CLOCK_UPTIME_RAW&lt;/tt&gt; were introduced in macOS 10.12. So what happens on OS X 10.11 and later is that the first block of code that uses &lt;tt&gt;clock_gettime&lt;/tt&gt; gets used and this compiles fine. And on OS X 10.10 and earlier the second block that uses &lt;tt&gt;clock_gettime_nsec_np&lt;/tt&gt; is used which fails to compile.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Environment&quot;&gt;&lt;/a&gt;Environment&lt;/h4&gt;

&lt;p&gt;libbson 1.24.1&lt;/p&gt;

&lt;p&gt;OS X 10.10 (or earlier) x86_64 (but this is irrelevant)&lt;/p&gt;

&lt;p&gt;Apple LLVM version 7.0.2 (clang-700.1.81) (but this is irrelevant)&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;Build libbson 1.24.1 (with the patch to fix &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4609&quot; title=&quot;implicit declaration of function &amp;#39;aligned_alloc&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4609&quot;&gt;&lt;del&gt;CDRIVER-4609&lt;/del&gt;&lt;/a&gt;)&#160;on OS X 10.10 or earlier&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;The previous version of the don&apos;t-have-&lt;tt&gt;clock_gettime&lt;/tt&gt; fallback code for macOS compiled fine because it used &lt;tt&gt;mach_timebase_info&lt;/tt&gt; and &lt;tt&gt;mach_absolute_time&lt;/tt&gt; which exist on every version of macOS. Now that this code was removed, the headers for the mach time functions can be removed too:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/blob/9e7bf882d1fb4e16f5701a152f5c664088ffcda3/src/libbson/src/bson/bson-clock.c#L18-L23&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/blob/9e7bf882d1fb4e16f5701a152f5c664088ffcda3/src/libbson/src/bson/bson-clock.c#L18-L23&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2384615">CDRIVER-4674</key>
            <summary>Pointless code in bson-clock.c</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="josh.siegel@mongodb.com">Josh Siegel</assignee>
                                    <reporter username="ryandesign">Ryan Schmidt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 6 Jul 2023 03:44:36 +0000</created>
                <updated>Sat, 28 Oct 2023 11:27:48 +0000</updated>
                            <resolved>Thu, 20 Jul 2023 18:31:05 +0000</resolved>
                                    <version>1.24.1</version>
                                    <fixVersion>1.24.3</fixVersion>
                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5599403" author="xgen-internal-githook" created="Fri, 28 Jul 2023 19:23:39 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Joshua Siegel&apos;, &apos;email&apos;: &apos;39130209+joshbsiegel@users.noreply.github.com&apos;, &apos;username&apos;: &apos;joshbsiegel&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4674&quot; title=&quot;Pointless code in bson-clock.c&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4674&quot;&gt;&lt;del&gt;CDRIVER-4674&lt;/del&gt;&lt;/a&gt; remove unnecessary code from bson-clock.c (#1348)&lt;br/&gt;
Branch: r1.24&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/48d25775cd655e3d46b476c510234f76e98fcde7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/48d25775cd655e3d46b476c510234f76e98fcde7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5580931" author="xgen-internal-githook" created="Thu, 20 Jul 2023 18:30:26 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Joshua Siegel&apos;, &apos;email&apos;: &apos;39130209+joshbsiegel@users.noreply.github.com&apos;, &apos;username&apos;: &apos;joshbsiegel&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4674&quot; title=&quot;Pointless code in bson-clock.c&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4674&quot;&gt;&lt;del&gt;CDRIVER-4674&lt;/del&gt;&lt;/a&gt; remove unnecessary code from bson-clock.c (#1348)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/6d2be25206daeb55960c84a5f129b226f0a25393&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/6d2be25206daeb55960c84a5f129b226f0a25393&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5580930" author="xgen-internal-githook" created="Thu, 20 Jul 2023 18:30:25 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Joshua Siegel&apos;, &apos;email&apos;: &apos;39130209+joshbsiegel@users.noreply.github.com&apos;, &apos;username&apos;: &apos;joshbsiegel&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-4674&quot; title=&quot;Pointless code in bson-clock.c&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-4674&quot;&gt;&lt;del&gt;CDRIVER-4674&lt;/del&gt;&lt;/a&gt; remove unnecessary code from bson-clock.c (#1348)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/6d2be25206daeb55960c84a5f129b226f0a25393&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/6d2be25206daeb55960c84a5f129b226f0a25393&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5546290" author="dbeng-pm-bot" created="Thu, 6 Jul 2023 03:44:39 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ryandesign&quot; class=&quot;user-hover&quot; rel=&quot;ryandesign&quot;&gt;ryandesign&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6jhq:i</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>