<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8061">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">headers: Replace typeof with __typeof__.<br><br>This was required by clang 4.0 (for example on FreeBSD 11.1) while compiling<br>the module res_snmp.<br><br>ASTERISK-27629<br><br>Change-Id: I0d7a2c62ed256cca19a50340e3c337567ac78e58<br>---<br>M include/asterisk/strings.h<br>M include/asterisk/time.h<br>M include/asterisk/utils.h<br>3 files changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/61/8061/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h<br>index 85393b4..3660442 100644<br>--- a/include/asterisk/strings.h<br>+++ b/include/asterisk/strings.h<br>@@ -742,7 +742,7 @@<br> char *ast_str_truncate(struct ast_str *buf, ssize_t len),<br> {<br> if (len < 0) {<br>- if ((typeof(buf->__AST_STR_USED)) -len >= buf->__AST_STR_USED) {<br>+ if ((__typeof__(buf->__AST_STR_USED)) -len >= buf->__AST_STR_USED) {<br> buf->__AST_STR_USED = 0;<br> } else {<br> buf->__AST_STR_USED += len;<br>diff --git a/include/asterisk/time.h b/include/asterisk/time.h<br>index f49d689..24acada 100644<br>--- a/include/asterisk/time.h<br>+++ b/include/asterisk/time.h<br>@@ -41,8 +41,8 @@<br> note:dummy_tv_var_for_types never actually gets exported, only used as<br> local place holder. */<br> extern struct timeval dummy_tv_var_for_types;<br>-typedef typeof(dummy_tv_var_for_types.tv_sec) ast_time_t;<br>-typedef typeof(dummy_tv_var_for_types.tv_usec) ast_suseconds_t;<br>+typedef __typeof__(dummy_tv_var_for_types.tv_sec) ast_time_t;<br>+typedef __typeof__(dummy_tv_var_for_types.tv_usec) ast_suseconds_t;<br> <br> /*!<br> * \brief Computes the difference (in seconds) between two \c struct \c timeval instances.<br>diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h<br>index c6c3407..c919057 100644<br>--- a/include/asterisk/utils.h<br>+++ b/include/asterisk/utils.h<br>@@ -227,7 +227,7 @@<br> #undef MAX<br> #define MAX(a, b) ({ typeof(a) __a = (a); typeof(b) __b = (b); ((__a < __b) ? __b : __a);})<br> <br>-#define SWAP(a,b) do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)<br>+#define SWAP(a,b) do { __typeof__(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)<br> <br> /*!<br> * \brief Encode data in base64<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8061">change 8061</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8061"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I0d7a2c62ed256cca19a50340e3c337567ac78e58 </div>
<div style="display:none"> Gerrit-Change-Number: 8061 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>