<p>It seems the <code>eth_conf_t</code> struct has problems with c++. I also noticed the attributes were not in the same order in the struct definition and in <code>periph_conf.h</code> and this is important with c++.<br>
In <code>cpu/stm32_common/periph_cpu_common.h</code>, how about defining enums and struct the following way (the order is also fixed, I kept the same one use in periph_conf.h):</p>
<div class="highlight highlight-source-c"><pre><span class="pl-c"><span class="pl-c">/*</span>*</span>
<span class="pl-c"> * @brief   Ethernet configuration mode</span>
<span class="pl-c"> <span class="pl-c">*/</span></span>
<span class="pl-k">typedef</span> <span class="pl-k">enum</span> {
    MII = <span class="pl-c1">18</span>,                       <span class="pl-c"><span class="pl-c">/*</span>*< Configuration for MII <span class="pl-c">*/</span></span>
    RMII = <span class="pl-c1">9</span>,                       <span class="pl-c"><span class="pl-c">/*</span>*< Configuration for RMII <span class="pl-c">*/</span></span>
    SMI = <span class="pl-c1">2</span>,                        <span class="pl-c"><span class="pl-c">/*</span>*< Configuration for SMI <span class="pl-c">*/</span></span>
} <span class="pl-c1">eth_mode_t</span>;

<span class="pl-c"><span class="pl-c">/*</span>*</span>
<span class="pl-c"> * @brief   Speed selection</span>
<span class="pl-c"> <span class="pl-c">*/</span></span>
<span class="pl-k">typedef</span> <span class="pl-k">enum</span> {
    ETH_SPEED_10T_HD = <span class="pl-c1">0x0000</span>,
    ETH_SPEED_10T_FD = <span class="pl-c1">0x0100</span>,
    ETH_SPEED_100TX_HD = <span class="pl-c1">0x2000</span>,
    ETH_SPEED_100TX_FD = <span class="pl-c1">0x2100</span>,
} <span class="pl-c1">eth_speed_t</span>;

<span class="pl-c"><span class="pl-c">/*</span>*</span>
<span class="pl-c"> * @brief   Ethernet Peripheral configuration</span>
<span class="pl-c"> <span class="pl-c">*/</span></span>
<span class="pl-k">typedef</span> <span class="pl-k">struct</span> {
    <span class="pl-c1">eth_mode_t</span> mode;                    <span class="pl-c"><span class="pl-c">/*</span>*< Select configuration mode <span class="pl-c">*/</span></span>
    <span class="pl-k">char</span> mac[<span class="pl-c1">6</span>];                        <span class="pl-c"><span class="pl-c">/*</span>*< Ethernet MAC address <span class="pl-c">*/</span></span>
    <span class="pl-c1">eth_speed_t</span> speed;                  <span class="pl-c"><span class="pl-c">/*</span>*< Speed selection <span class="pl-c">*/</span></span>
    <span class="pl-c1">uint8_t</span> dma;                        <span class="pl-c"><span class="pl-c">/*</span>*< Locical CMA Descriptor used for TX <span class="pl-c">*/</span></span>
    <span class="pl-c1">uint8_t</span> dma_chan;                   <span class="pl-c"><span class="pl-c">/*</span>*< DMA channel used for TX <span class="pl-c">*/</span></span>
    <span class="pl-k">char</span> phy_addr;                      <span class="pl-c"><span class="pl-c">/*</span>*< PHY address <span class="pl-c">*/</span></span>
    <span class="pl-c1">gpio_t</span> pins[];                      <span class="pl-c"><span class="pl-c">/*</span>*< Pins to use. MII requires 18 pins,</span>
<span class="pl-c">                                             RMII 9 and SMI 9. Not all speeds are</span>
<span class="pl-c">                                             supported by all modes. <span class="pl-c">*/</span></span>
} <span class="pl-c1">eth_conf_t</span>;</pre></div>
<p>There might be better alternatives but this one builds.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10633?email_source=notifications&email_token=ABE7WYF6BBVGA5WHAO4MPATP4ZCNVA5CNFSM4GLCXYJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2V4SI#issuecomment-506814025">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHTP3LNGRFPCNOB4NTP4ZCNVANCNFSM4GLCXYJA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYEDKYQNWUJWECFUKOTP4ZCNVA5CNFSM4GLCXYJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2V4SI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10633?email_source=notifications\u0026email_token=ABE7WYF6BBVGA5WHAO4MPATP4ZCNVA5CNFSM4GLCXYJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2V4SI#issuecomment-506814025",
"url": "https://github.com/RIOT-OS/RIOT/pull/10633?email_source=notifications\u0026email_token=ABE7WYF6BBVGA5WHAO4MPATP4ZCNVA5CNFSM4GLCXYJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2V4SI#issuecomment-506814025",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>