Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler/clipboard.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler/clipboard.cc b/winsup/cygwin/fhandler/clipboard.cc
index fe3545bf5..376d43440 100644
--- a/winsup/cygwin/fhandler/clipboard.cc
+++ b/winsup/cygwin/fhandler/clipboard.cc
@@ -322,6 +322,13 @@ fhandler_dev_clipboard::lseek (off_t offset, int whence)
* On writes we use this to decide how to write - empty and write, or open, copy, empty
* and write
*/
+ if (whence == SEEK_CUR)
+ return 0;
+ if (whence != SEEK_SET)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
pos = offset;
/* treat seek like rewind */
if (membuffer)