[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xenstored: fix build on libc without O_CLOEXEC



commit f8708b0ed6d549d1d29b8b5cc287f1f2b642bc63
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Jan 27 17:08:32 2021 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jan 27 17:08:32 2021 +0100

    xenstored: fix build on libc without O_CLOEXEC
    
    The call to lu_read_state() would remain unresolved in this case. Frame
    the construct by a suitable #ifdef, and while at it also frame command
    line handling related pieces similarly.
    
    Fixes: 9777fa6b6ea0 ("tools/xenstore: evaluate the live update flag when 
starting")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/xenstore/xenstored_core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 65ecdd0568..1ab6f162cb 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -2061,7 +2061,9 @@ static struct option options[] = {
        { "internal-db", 0, NULL, 'I' },
        { "verbose", 0, NULL, 'V' },
        { "watch-nb", 1, NULL, 'W' },
+#ifndef NO_LIVE_UPDATE
        { "live-update", 0, NULL, 'U' },
+#endif
        { NULL, 0, NULL, 0 } };
 
 extern void dump_conn(struct connection *conn); 
@@ -2141,9 +2143,11 @@ int main(int argc, char *argv[])
                case 'p':
                        priv_domid = strtol(optarg, NULL, 10);
                        break;
+#ifndef NO_LIVE_UPDATE
                case 'U':
                        live_update = true;
                        break;
+#endif
                }
        }
        if (optind != argc)
@@ -2206,9 +2210,11 @@ int main(int argc, char *argv[])
        if (tracefile)
                tracefile = talloc_strdup(NULL, tracefile);
 
+#ifndef NO_LIVE_UPDATE
        /* Read state in case of live update. */
        if (live_update)
                lu_read_state();
+#endif
 
        /* Get ready to listen to the tools. */
        initialize_fds(&sock_pollfd_idx, &timeout);
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.