daniel-p-carvalho commented on code in PR #3782:
URL: https://github.com/apache/nuttx-apps/pull/3782#discussion_r4030297733


##########
netutils/ptpd/ptpd.c:
##########
@@ -861,7 +861,25 @@ static int ptp_sendmsg(FAR struct ptp_state_s *state, FAR 
const void *buf,
 
   if (sendts != NULL)
     {
+#ifdef SIOCG_TX_HW_TIMESTAMP
+      struct ifreq req;
+      int ret_ts;
+
+      memset(&req, 0, sizeof(req));
+      strlcpy(req.ifr_name, state->config->interface, sizeof(req.ifr_name));
+      req.ifr_data = sendts;
+
+      ret_ts = ioctl(state->tx_socket, SIOCG_TX_HW_TIMESTAMP,
+                     (unsigned long)&req);
+      if (ret_ts < 0)

Review Comment:
   Fixed, along with all the other cast-removal / one-line-merge comments below 
- just pushed. One exception: the `if (state->path_delay_avgcount < 
CONFIG_NETUTILS_PTPD_DELAYREQ_AVGCOUNT)` merge (the comment on line 1499 in the 
original diff) would exceed nxstyle's 78-column limit as a single line, so I 
kept it wrapped as it was. Also rebased onto current master to resolve the 
merge conflict.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to