Ethanlm commented on a change in pull request #3366:
URL: https://github.com/apache/storm/pull/3366#discussion_r669933760



##########
File path: storm-core/src/native/worker-launcher/impl/oci/oci.c
##########
@@ -0,0 +1,881 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <linux/loop.h>
+#include <sys/types.h>
+#include <sys/mount.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <openssl/evp.h>
+
+// LOOP_CTL_GET_FREE ioctl is supported since linux kernel 3.1
+//Add this so it can compile on older version of linux kernel,
+//but certain runc related functionalities will not work during runtime.
+#ifndef LOOP_CTL_GET_FREE
+#define LOOP_CTL_GET_FREE  0x4C82

Review comment:
       see https://man7.org/linux/man-pages/man4/loop.4.html
   ```
          LOOP_CTL_GET_FREE
                 Allocate or find a free loop device for use.  On success,
                 the device number is returned as the result of the call.
                 This operation takes no argument.
   ```
   Adding this definition, if not set already, is to make sure it can still 
compile on older version of linux kernel. 




-- 
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: dev-unsubscr...@storm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to