2017-01-17 08:18:54 +00:00
|
|
|
Index: chrony-3.0/clknetsim-6bb6519590ebf43a61f2c11442da525a1950b7df/client.c
|
2016-04-14 07:06:33 +00:00
|
|
|
===================================================================
|
2017-01-17 08:18:54 +00:00
|
|
|
--- chrony-3.0/clknetsim-6bb6519590ebf43a61f2c11442da525a1950b7df/client.c
|
|
|
|
+++ chrony-3.0/clknetsim-6bb6519590ebf43a61f2c11442da525a1950b7df/client.c
|
2016-06-08 13:53:28 +00:00
|
|
|
@@ -954,6 +954,8 @@ int open(const char *pathname, int flags
|
2016-04-14 07:06:33 +00:00
|
|
|
else if (!strcmp(pathname, "/dev/ptp1"))
|
|
|
|
return SYSCLK_FD;
|
|
|
|
|
|
|
|
+ if (!_open)
|
|
|
|
+ _open = (int (*)(const char *pathname, int flags))dlsym(RTLD_NEXT, "open");
|
|
|
|
r = _open(pathname, flags);
|
|
|
|
assert(r < 0 || (r < BASE_SOCKET_FD && r < BASE_TIMER_FD));
|
|
|
|
|
2016-06-08 13:53:28 +00:00
|
|
|
@@ -972,6 +974,8 @@ int close(int fd) {
|
2016-04-14 07:06:33 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ if (!_close)
|
|
|
|
+ _close = (int (*)(int fd))dlsym(RTLD_NEXT, "close");
|
|
|
|
return _close(fd);
|
|
|
|
}
|
|
|
|
|