How about simply just:

diff --git a/winsup/cygwin/fhandler_clipboard.cc 
b/winsup/cygwin/fhandler_clipboard.cc
index ccdb295f3..d822f4fc4 100644
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ b/winsup/cygwin/fhandler_clipboard.cc
@@ -28,9 +28,10 @@ static const WCHAR *CYGWIN_NATIVE = 
L"CYGWIN_NATIVE_CLIPBOARD";
 
 typedef struct
 {
-  timestruc_t  timestamp;
-  size_t       len;
-  char         data[1];
+  uint64_t tv_sec;
+  uint64_t tv_nsec;
+  uint64_t len;
+  char data[1];
 } cygcb_t;
 
 fhandler_dev_clipboard::fhandler_dev_clipboard ()
@@ -74,7 +75,10 @@ fhandler_dev_clipboard::set_clipboard (const void *buf, 
size_t len)
        }
       clipbuf = (cygcb_t *) GlobalLock (hmem);
 
-      clock_gettime (CLOCK_REALTIME, &clipbuf->timestamp);
+      struct timespec ts;
+      clock_gettime (CLOCK_REALTIME, &ts);
+      clipbuf->tv_sec = ts.tv_sec;
+      clipbuf->tv_nsec = ts.tv_nsec;
       clipbuf->len = len;
       memcpy (clipbuf->data, buf, len);
 
@@ -179,7 +183,10 @@ fhandler_dev_clipboard::fstat (struct stat *buf)
          && (hglb = GetClipboardData (format))
          && (clipbuf = (cygcb_t *) GlobalLock (hglb)))
        {
-         buf->st_atim = buf->st_mtim = clipbuf->timestamp;
+         struct timespec ts;
+         ts.tv_sec = clipbuf->tv_sec;
+         ts.tv_nsec = clipbuf->tv_nsec;
+         buf->st_atim = buf->st_mtim = ts;
          buf->st_size = clipbuf->len;
          GlobalUnlock (hglb);
        }

-- 
Takashi Yano <takashi.y...@nifty.ne.jp>

Reply via email to